Page 1 of 1

Php & Db Problim

Posted: Wed Feb 18, 2004 3:37 am
by doggy

Code: Select all

<?php
include("themes/default/theme.php");
include("mainfile.php");

$DB = new DB;                                                                                                                                    
$address = $HTTP_GET_VARS['address'];                                                                                                                                                         
$DB->sql = "SELECT * FROM address WHERE adress = '1000000000000001'";                                                                                                  
$DB->result = mysql_query($DB->sql);                                                                                               
$DB->row = mysql_fetch_array($DB->result);
$title = $DB->row[title];

themeheader('$title', "Theme Header");
themeblockl("Block Left");
themecontent("Content");
themeblockr("Block Right");
themefooter("FOOT FOOT");
?>
I get this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\FoxServ\www\atlas_n\index.php on line 10

and line 10 is

$DB->row = mysql_fetch_array($DB->result);

PLease could some one help me out. Thanks