unidox Posted May 29, 2008 Share Posted May 29, 2008 I have this: 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 ''pcp_users' WHERE 'user_id' = '69'' at line 1 This is the line of code: $table = $this->table; $table_id = $this->table_id; $q = mysql_query("SELECT * FROM '$table' WHERE '$table_id' = '69'") or die (mysql_error()); Whats wrong? Link to comment https://forums.phpfreaks.com/topic/107880-solved-sql-error/ Share on other sites More sharing options...
pocobueno1388 Posted May 29, 2008 Share Posted May 29, 2008 Try this: $query = "SELECT * FROM $table WHERE '$table_id' = 69"; $q = mysql_query($query) or die (mysql_error()."<p>With Query<br>$query"); That will show you the query, and you can make sure all the variables are properly filled in as well. Link to comment https://forums.phpfreaks.com/topic/107880-solved-sql-error/#findComment-553026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.