timmah1 Posted December 20, 2007 Share Posted December 20, 2007 If I want everything that is greater than 5, is this the right code? $vote = "SELECT * FROM vote WHERE total > '5' LIMIT 10" Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/ Share on other sites More sharing options...
Jessica Posted December 20, 2007 Share Posted December 20, 2007 '5' Is a string, 5 is a number. I think MySQL has stricter typing than PHP so if that doesn't work try just 5. Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419089 Share on other sites More sharing options...
Trium918 Posted December 20, 2007 Share Posted December 20, 2007 If I want everything that is greater than 5, is this the right code? $vote = "SELECT * FROM vote WHERE total > '5' LIMIT 10" Thanks in advance Maybe you should try it before asking a question such as the one you are referring to. Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419091 Share on other sites More sharing options...
timmah1 Posted December 20, 2007 Author Share Posted December 20, 2007 Trium918, I wouldn't be on here if I didn't already try it, but thanks for the help. jesirose, I tried that, and it still didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419093 Share on other sites More sharing options...
teng84 Posted December 20, 2007 Share Posted December 20, 2007 what is the data type of total? Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419098 Share on other sites More sharing options...
timmah1 Posted December 20, 2007 Author Share Posted December 20, 2007 I got it to work. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419099 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.