Query was working then just stopped - 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: Query was working then just stopped (/showthread.php?tid=52105) |
Query was working then just stopped - El Forum - 05-29-2012 [eluser]Unknown[/eluser] Hello all, I am new to CodeIgniter and really need some help. In my Model I have a query that is now just not working. I have no idea why.. Here is the error: A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12,311,8,64 Group By am_app_id Having count(*)= 4' at line 1 SELECT am_app_id FROM vendor_app_features Where am_feature_id in 12,311,8,64 Group By am_app_id Having count(*)= 4 Filename: /var/www/edjmatrix.com/htdocs/matrix/models/app_features_model.php Line Number: 64 Here is the actual code: Code: function getAllAppsByFeatureId($featuresArrayOld) { Can you see anything wrong with this? What can I change? Up until 11:00 today it was working just fine. I inhearted this site and I am trying to learn this MVC as fast as I can. -J Query was working then just stopped - El Forum - 05-29-2012 [eluser]Kenneth Vogt[/eluser] Your WHERE clause is missing its parentheses, at least according to the error you posted. It should be: Code: Where am_feature_id in (12,311,8,64) |