designanddev Posted January 21, 2013 Share Posted January 21, 2013 Hi all can anyone spot what im doing wrong with this query? it keeps coming up with a mysql error. $result_set = self::find_by_sql("SELECT * FROM ".self::$table_name."ORDER BY 'photographs'.'id' DESC LIMIT 3 "); Kind Regards Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 21, 2013 Share Posted January 21, 2013 You probably need a space before ORDER. In the future POST THE ERROR. Quote Link to comment Share on other sites More sharing options...
requinix Posted January 22, 2013 Share Posted January 22, 2013 And you're using the wrong quotes for the table and field names. They have to be backticks `, not quotes " or apostrophes '. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.