phpretard Posted January 24, 2008 Share Posted January 24, 2008 I am trying to display links to people that login. Each user is assigned a class number(1 thru 7). The links also have a class number. No prblem there. The problem is a class 7 needs to see all links asigned a class 7 or less. Here's the code my little brain came up with... $result = mysql_query("SELECT * FROM links WHERE class='$?????? < = $??????' "); It dosn't work...am I even close to getting this right? Link to comment https://forums.phpfreaks.com/topic/87651-solved-equal-to-or-less-than/ Share on other sites More sharing options...
teng84 Posted January 24, 2008 Share Posted January 24, 2008 $result = mysql_query("SELECT * FROM links WHERE class<=7 "); Link to comment https://forums.phpfreaks.com/topic/87651-solved-equal-to-or-less-than/#findComment-448311 Share on other sites More sharing options...
phpretard Posted January 24, 2008 Author Share Posted January 24, 2008 That worked but why don't you need the single quotes. Typically you do right? Link to comment https://forums.phpfreaks.com/topic/87651-solved-equal-to-or-less-than/#findComment-448312 Share on other sites More sharing options...
revraz Posted January 24, 2008 Share Posted January 24, 2008 Its not a string. Link to comment https://forums.phpfreaks.com/topic/87651-solved-equal-to-or-less-than/#findComment-448314 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.