you can supress the error using @
eg
$result=@(select id from table)
$var=@mysql_result($result,$i,id);
test for the value of $var using isset
if (isset($var)) {
drop table
create table
}
else
{
create table
}
I havent had the need to do this but i guess you could just isset($result) and save yourself a line of code.
I hope thats what you were looking for.