gple Posted March 1, 2009 Share Posted March 1, 2009 mysql_query("select * from table where cat='$variable'") what value must $variable be to select all records? Quote Link to comment https://forums.phpfreaks.com/topic/147391-help-with-select-statement/ Share on other sites More sharing options...
Vermillion Posted March 1, 2009 Share Posted March 1, 2009 <?php mysql_query("SELECT * EXCEPT field1, field2, etc FROM table WHERE); ?> There are probably better methods to do that. Quote Link to comment https://forums.phpfreaks.com/topic/147391-help-with-select-statement/#findComment-773653 Share on other sites More sharing options...
andy_b42 Posted March 1, 2009 Share Posted March 1, 2009 mysql_query("SELECT * EXCEPT field1, field2, etc FROM table WHERE); Correct me if i am wrong, but i believe adding in a WHERE clause requires that arguments be supplied, i think the code above would just error as soon as the database attempted to execute the query. gple, if you remove your where clause completely, youshould get back all of the results in the table e.g. mysql_query("select * from table") Quote Link to comment https://forums.phpfreaks.com/topic/147391-help-with-select-statement/#findComment-773698 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.