purencool Posted May 31, 2011 Share Posted May 31, 2011 hi phpfreaks, I have created a query and I have just work out that is wrong the issue is I don't know what the syntax is to get it right. I have selected columns that need to be returned from the table. This is all correct, where I go wrong is I have a variable that I want the sql to search the whole table and return the result. Any help would be greatly appreciated. SELECT Business_Name,First_Name,Last_Name,Username,Email,Phone,Mobile,Social_Media,Web_Site,User_Language,Admin_Level FROM customer WHERE $variable Quote Link to comment https://forums.phpfreaks.com/topic/237950-query-question/ Share on other sites More sharing options...
gristoi Posted May 31, 2011 Share Posted May 31, 2011 Which column does the variable relate to?, for example if it related to the Mobile column: SELECT Business_Name,First_Name,Last_Name,Username,Email,Phone,Mobile,Social_Media,Web_Site,User_Language,Admin_Level FROM customer WHERE Mobile = '$variable' Quote Link to comment https://forums.phpfreaks.com/topic/237950-query-question/#findComment-1222793 Share on other sites More sharing options...
purencool Posted May 31, 2011 Author Share Posted May 31, 2011 thanks for the answer the variable relates to the everyone one of the columns that are selected? Quote Link to comment https://forums.phpfreaks.com/topic/237950-query-question/#findComment-1223148 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.