$Conn=mysql_connect("localhost","willyrat","booboo1"); //Make connection to db
if(!$Conn)
{
die("Could establish connection to server localhost.");
}
if(!mysql_select_db("willyrat"))
{
die("Couldn't select database willyrat."); //Select table to work with
}
$rs=mysql_query ("SELECT * FROM news WHERE active=1 ORDER BY date DESC",$Conn); //Run query against the db
if(!$rs)
{
die("Couldn't create recordset");
}
?>
|
||||||||
Hosted on phpwebhosting.com
|