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 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. 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. 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. 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? 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 Link to comment https://forums.phpfreaks.com/topic/82427-solved-is-this-right/#findComment-419099 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.