Part of the EllisLab Network
   
2 of 2
2
How to insert mysql query to CodeIgniter?
Posted: 04 February 2012 01:56 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Avatar
Total Posts:  17
Joined  11-27-2011

Could you export the database? and send it to me.. i can get it work for you then i will post the correct codes.. if that’s okay with you

Profile
 
 
Posted: 04 February 2012 05:31 AM   [ Ignore ]   [ # 12 ]  
Summer Student
Avatar
Total Posts:  16
Joined  01-29-2012

Thank you for your kindness. smile I really appreciate it. :D

Profile
 
 
Posted: 04 February 2012 05:37 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  293
Joined  03-18-2011

why you are loading database with PHP.

$db "mds_reports";
 
 if(
$connect mysql_connect("172.16.8.32""mds_reports""password"))
    
$connect mysql_select_db($db);
     else die(
"Unable to connect".mysql_error()); 

you can set other database variable into application/config/database.php and can load databases like

$this->load->database('first_database');
OR
$this->load->database('second_database'); 
Profile
 
 
Posted: 05 February 2012 07:52 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Avatar
Total Posts:  16
Joined  01-29-2012

@Bhashkar - I already done with it, I already set my database into application/config/database.php. The first one that you are talking about is just part of my php query.

Profile
 
 
Posted: 07 February 2012 12:54 AM   [ Ignore ]   [ # 15 ]  
Summer Student
Avatar
Total Posts:  16
Joined  01-29-2012

Hi..

How can I extract the file as csv using Code Igniter..?

Profile
 
 
Posted: 07 February 2012 12:58 AM   [ Ignore ]   [ # 16 ]  
Summer Student
Avatar
Total Posts:  16
Joined  01-29-2012

 

Profile
 
 
   
2 of 2
2