How would I list all the information in a table by a certain field. So I could view it all in order of date, or location.
maybe i should be more specific, I want to list everything in a database, in order of a certain column. I want to put everything into a table in html. Do I have to do it all with a for.. loop or what? any insight?
$result = mysql_query("select * from table_name order by column_name");
sorry, just saw your 2nd post. here's the rest:
echo("<table>"); while( $row = mysql_fetch_array($result) ) { echo(" <tr> <td>$row[col1]</td> <td>$row[col2]</td> <td>$row[col3]</td> <td>$row[col4]</td> </tr> "); } echo("</table>");
now isnt that just going to be for one record tho, how would i have it go thru all records?
nevermind i see the while statment, THANKS!