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 -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -