jimfog Posted November 28, 2012 Share Posted November 28, 2012 I have a table, with one row in it, one of the columns is named bus_userstype this specific column at this specific row has a value of 1. I am trying to retrieve that value with the below query: SELECT *FROM busines_usersWHERE bus_userstype =1 I am writing the above query not within a PHP script but from with PHPMyAdmin. The message I get though(from PHPMyAdmin) does not make sense: MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0005 sec ) How can it return an empty result set if there is a value of 1 as I mention above? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 28, 2012 Share Posted November 28, 2012 If there is a matching row then it won't return an empty result set. Link to comment Share on other sites More sharing options...
jimfog Posted November 28, 2012 Author Share Posted November 28, 2012 Well...the query was wrong after all-its syntax I mean,the 1 had to be enclosed in quotation marks. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 28, 2012 Share Posted November 28, 2012 You need to trust the database. Databases wouldn't be very useful if they returned incorrect results. Instead of asking "why is the database broken" you should be asking "what am I missing?" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now