Klance Posted April 12, 2008 Share Posted April 12, 2008 Ok, so I have a form where you can enter the type of console and the difficulty of the game and it's put into one table. So say I want to view PS2 difficulty HARD how would I select only records that have console PS2 AND difficulty HARD using a MySQL query? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted April 12, 2008 Share Posted April 12, 2008 <?php $sql="SELECT *FROM ps2_console WHERE hard=$hard ORDER BY $hard"; $result= mysql_query($sql) or die(mysql_error()); ?> Quote Link to comment Share on other sites More sharing options...
CrustyDOD Posted April 12, 2008 Share Posted April 12, 2008 SELECT FROM ... WHERE console = 'PS2' AND difficulty = 'HARD' That's about it Quote Link to comment Share on other sites More sharing options...
Klance Posted April 12, 2008 Author Share Posted April 12, 2008 Thank you that worked. Quote Link to comment 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.