![]() |
Database Error Number: 0 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Database Error Number: 0 (/showthread.php?tid=38880) |
Database Error Number: 0 - El Forum - 02-22-2011 [eluser]Dennis Geus[/eluser] Hi all, I'm uploading a .csv file and then insert the data into a temp table in the database. I'm using the following piece of code: Code: $path = './uploads/'; It ends up with the following error: Quote:A Database Error Occurred But when I check the temp table it is filled with the data of the csv file. in my logfile i find this line: Quote:Severity: Warning --> mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Unable to save result set G:\Inetpub\development\qc\system\database\drivers\mysql\mysql_driver.php 163 After a few hours of searching I think I can't find it. If someone can point me to the right direction or can come up with a workaround i would appreciate it. ![]() Database Error Number: 0 - El Forum - 02-22-2011 [eluser]Dennis Geus[/eluser] I think I solved it by using the simple_query $this->db->simple_query("LOAD DATA .... now testing it and expanding the code to do more with the data. Database Error Number: 0 - El Forum - 02-22-2011 [eluser]rogerwaldrup[/eluser] Let us know how it works out. It's always good to learn how a problem was solved. Database Error Number: 0 - El Forum - 02-23-2011 [eluser]Dennis Geus[/eluser] ok, well it's working. Code: $path = './uploads/'; The only problem is that it always returns als FALSE (but it inserts the data), so I can't do any checks with it. I think I'll have to do a query on the temp table to see if it has data before I continue with the rest. |