codeigniter query |
[eluser]Zied[/eluser]
how can i save the codeigniter query & simple query in sql file without to execute ?
[eluser]Zied[/eluser]
I need to have file.sql contain : UPDATE `tbl_shop` SET `page_url` = 'http://www.sfsfsdf' WHERE `tbl_shop`.`id_shop` =10484; UPDATE `tbl_shop` SET `page_url` = 'http://rrrrrrrbdgb' WHERE `tbl_shop`.`id_shop` =10455; UPDATE `tbl_shop` SET `page_url` = 'http://www.sfsfsdf' WHERE `tbl_shop`.`id_shop` =10484; UPDATE `tbl_shop` SET `page_url` = 'http://rrggdgrbdgb' WHERE `tbl_shop`.`id_shop` =10455; to run this query in another database.
[eluser]Atharva[/eluser]
For backing up db, have a look at database utilities class http://ellislab.com/codeigniter/user-gui...tml#backup
[eluser]Zied[/eluser]
Think you, but this is not my question. My question is the way to save the query lines in simple file. I found the solution, is to create the query with: Code: $query=$this->db->query($sql);
[eluser]LuckyFella73[/eluser]
When using the active record class you can get the query like this: Code: $my_query = $this->db->last_query(); |
Welcome Guest, Not a member yet? Register Sign In |