TecTao Posted May 25, 2009 Share Posted May 25, 2009 Have a 3 column table, id, category_names, category_status. There are 37 rows. The select statement works fine, produces a long list of the 37 category_names. Would like to break up the list into 3 columns and am stuck. Here the select statement I'm using. <?php $result = mysql_query( "SELECT * FROM _list WHERE category_status <> 1 ORDER BY category_names ASC" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { extract($row); echo $category_names; echo "<br> "; $row_count++; } mysql_close; ?> Thank you for any help or suggestions in advance. Mike Link to comment https://forums.phpfreaks.com/topic/159625-solved-need-multiple-columns-select-statement/ Share on other sites More sharing options...
GingerRobot Posted May 25, 2009 Share Posted May 25, 2009 You mean you want to output the data in a table with 3 columns? Check out this FAQ/post : http://www.phpfreaks.com/forums/index.php/topic,95426.0.html Link to comment https://forums.phpfreaks.com/topic/159625-solved-need-multiple-columns-select-statement/#findComment-841922 Share on other sites More sharing options...
TecTao Posted May 25, 2009 Author Share Posted May 25, 2009 Thanks for the link, that is what i've been searching for... that did it. Link to comment https://forums.phpfreaks.com/topic/159625-solved-need-multiple-columns-select-statement/#findComment-841936 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.