paulman888888 Posted June 2, 2008 Share Posted June 2, 2008 I have my code but i want to show only results with the same gameid and $_get['gameid'] heree is my code that i think i need to edit but dont know how. $result = mysql_query("SELECT * FROM myscore2 ORDER BY score DESC") Thankyou Link to comment https://forums.phpfreaks.com/topic/108393-another-quick-question/ Share on other sites More sharing options...
GingerRobot Posted June 2, 2008 Share Posted June 2, 2008 If gameid is an integer: $result = mysql_query("SELECT * FROM myscore2 WHERE gameid=$_GET['gameid'] ORDER BY score DESC") Otherwise: $result = mysql_query("SELECT * FROM myscore2 WHERE gameid='".$_GET['gameid']."' ORDER BY score DESC") Link to comment https://forums.phpfreaks.com/topic/108393-another-quick-question/#findComment-555670 Share on other sites More sharing options...
discomatt Posted June 2, 2008 Share Posted June 2, 2008 Don't forget to sanitize mysql_real_escape_string($_GET['gameid']) Damn that function name is WAY too long Link to comment https://forums.phpfreaks.com/topic/108393-another-quick-question/#findComment-555701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.