barrowvian Posted June 20, 2010 Share Posted June 20, 2010 I'm pretty new to mysql so couldn't even tell you the exact name of the problem I'm having Basically, I have a simple database with 3 fields; name, county and decision. What I'm wanting to do is select the data from the database and list it in alphabetical order; $sql = "SELECT * FROM names ORDER BY name ASC LIMIT $offset, $rowsperpage"; Once this is done I want to output the results depending on the 'decision field'. If the decision field = yes then I want the output result to be shown in green. If it = no then output it in red. But I still want to maintain the alpha order. Is this possible and how would I achieve this? thanks Quote Link to comment https://forums.phpfreaks.com/topic/205334-dont-know-what-im-looking-for/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 20, 2010 Share Posted June 20, 2010 The way that you display the data you retrieve with your query is up to your 'presentation' logic and this is not a mysql question. So, moving this thread to the php programming help forum section ... Quote Link to comment https://forums.phpfreaks.com/topic/205334-dont-know-what-im-looking-for/#findComment-1074660 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.