$query = "SELECT title, body FROM main WHERE pos =\"main\" OR pos =\"welcome\" ORDER BY pos DESC, id DESC";
$result = mysql_query($query, $mysql_link)
or die("Query failed : " . mysql_error() . " | ");
while ($line = mysql_fetch_array($result))
{ echo "\n";
echo " \n";
echo " ".$line[0]." \n";
echo " ".str_replace("\n", " ", $line[1]);
echo " | \n";
echo " ";
} //end while
mysql_free_result($result); //free resultset
?>
|
|
$query = "SELECT title, body FROM main WHERE pos =\"right\" ORDER BY id DESC";
$result = mysql_query($query, $mysql_link)
or die("Query failed : " . mysql_error() . " | ");
while ($line = mysql_fetch_array($result))
{ echo "\n";
echo " \n";
echo " ".$line[0]."
\n";
echo " ".str_replace("\n", " ", $line[1])."";
echo " | \n";
echo " ";
} //end while
mysql_free_result($result); //free resultset
?>
|