michael-lane
09-04-2005, 02:06 AM
would this below code output the data in no particular order if the order by collumn name didnt actually exsist (dont ask me why it wouldnt) was not set or would it return no results:
<?php
//connect to a database
include("db_info.php");
//perform query
$query = mysql_query("SELECT * FROM table ORDER BY fieldname");
//show results
while($row = mysql_fetch_row($query)) {
foreach($row as $field) {
echo "<b>$row</b><br>\n";
}
echo "---------";
}
echo "the above is a bunch of results from \"table\"";
?>
<?php
//connect to a database
include("db_info.php");
//perform query
$query = mysql_query("SELECT * FROM table ORDER BY fieldname");
//show results
while($row = mysql_fetch_row($query)) {
foreach($row as $field) {
echo "<b>$row</b><br>\n";
}
echo "---------";
}
echo "the above is a bunch of results from \"table\"";
?>
