![]() |
CI 1.7 - Error on querys (quotes escaping problems) - 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: CI 1.7 - Error on querys (quotes escaping problems) (/showthread.php?tid=12582) |
CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 10-29-2008 [eluser]Michael Layne[/eluser] I also hit this wall after upgrading from 1.6.3 to 1.70. FALSE took care of it, but this may be related... When I initially wrote this query, I kept on getting errors until I tried several ways of escaping the formatting for DATE_FORMAT. The only thing that worked was the following: Code: // had to escape the "first" format, but not the second... Only way it worked. At least with 1.7.0, I could remove the backsticks (was that proper use of the term?) Wonder if it was related... Thanks for the FALSE help though! Michael CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 10-30-2008 [eluser]mycroes[/eluser] Already posted some about it in another topic about the same issue, but now I noted the next issue: $this->db->orderby('column, othercolumn'); gets unusable too... Regards, Michael CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 10-30-2008 [eluser]mycroes[/eluser] workaround for issue above: $this->db->orderby('`column`,`othercolumn`'); CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 10-30-2008 [eluser]mycroes[/eluser] Next issue concerning quatation, join is also producing incorrect queries... Seems that instead of using 2 parameters you can concatenate them and put on in between, seems to make it somewhat better... I've stopped trying to 'fix' stuff though, I think I could keep on going for days otherwise... CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 11-02-2008 [eluser]moodh[/eluser] Just thought I'd mention some more backtick problems: Code: // Needs FALSE as second parameter CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 11-03-2008 [eluser]jleequeen[/eluser] Does anyone know the status on these fixes? I really do not look forward to going back into my models and putting FALSE everywhere I want to use an asterisk. I just finished a project last week using 1.6.3 and it was working perfectly fine, and just upgraded to 1.7 and am having these problems with queries, so I have to downgrade back to 1.6.3 until the fixes are complete. CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 11-03-2008 [eluser]Pascal Kriete[/eluser] A bunch of this has been fixed in the trunk. So you could upgrade to unstable if you want to make use of the new form validation library. [Edit: Ok, I lied - still broken if you specified a table prefix] CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 01-12-2009 [eluser]auston[/eluser] I believe the bug is in /system/database/DB_active_rec.php - Line 76, it is currently: Code: if ( is_bool($escape)) I believe it should be: Code: if (! is_bool($escape)) I got the idea from looking at the _protect_identifiers method in /system/database/DB_driver.php Hope someone finds this helpful? CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 01-13-2009 [eluser]skattabrain[/eluser] i gotta say, i'm puzzled as to why we haven't seen a 1.7.1 so people can start using 1.7 without worries of this issue. Unless I'm wrong ... but is this still an issue for many? using 1.7 on new projects, but not upgrading my past projects until this is in a core release. CI 1.7 - Error on querys (quotes escaping problems) - El Forum - 01-13-2009 [eluser]thespy[/eluser] [quote author="skattabrain" date="1231880045"]i gotta say, i'm puzzled as to why we haven't seen a 1.7.1 so people can start using 1.7 without worries of this issue. Unless I'm wrong ... but is this still an issue for many? using 1.7 on new projects, but not upgrading my past projects until this is in a core release.[/quote] Same here, I'm still on 1.6.3 due to this. |