php - Mysql query strange error -


I am getting an error when the second page is working well, but the second returns an error on the same query code.

Is my code here wrong with that?

  $ ttt = mysql_query ("Choose from * where (user_id = '$ user_id' and sound_id = '$ sound_id')", $ Link) or die (mysql_error ());   

Error

There is an error in your SQL syntax; Using WHERE (user_id = '' and 'sound_id =' ') similar to Check the manual related to your MySQL server version for the correct syntax for.

as is a SQL and you should use "likes" inside the backticks `` Where (user_id = '$ user_id' and sound_id = '$ sound_id') ", $ link) or die (mysql_error ()); txt = mysql_query / Code>

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -