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 Quote Link to comment 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 Quote Link to comment 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. 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.