daleGT Posted November 13, 2012 Share Posted November 13, 2012 Is it possible to use the Select from $sqlget = "SELECT * FROM For_Sale ORDER BY input_build ASC"; To sort by "input_build" ASC and also check "input_body" for one of the two options (coupe or sedan) & display only coupes as an example. Quote Link to comment https://forums.phpfreaks.com/topic/270617-another-newbie-question/ Share on other sites More sharing options...
pwntastic Posted November 13, 2012 Share Posted November 13, 2012 yes, you can do something like: $sqlget = "SELECT * FROM `For_Sale` WHERE `input_body` = 'sedan' ORDER BY `input_build` ASC"; just as long as you have a column in your db named input_body Quote Link to comment https://forums.phpfreaks.com/topic/270617-another-newbie-question/#findComment-1391961 Share on other sites More sharing options...
daleGT Posted November 13, 2012 Author Share Posted November 13, 2012 Champion! I was trying to use the WHERE i still struggle. Quote Link to comment https://forums.phpfreaks.com/topic/270617-another-newbie-question/#findComment-1391964 Share on other sites More sharing options...
thara Posted November 13, 2012 Share Posted November 13, 2012 The WHERE clause is used to extract only those records that fulfill a specified criterion. Syntax SELECT column_name(s) FROM table_name WHERE column_name operator value Example SELECT * FROM Persons WHERE FirstName='Peter' Quote Link to comment https://forums.phpfreaks.com/topic/270617-another-newbie-question/#findComment-1391972 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.