Code:
$query = mysql_list_tables($db);
$i = 0;
while($tbl= mysql_tablename($query, $i++))
{
if($tbl == 'reviews')
{
$exists = 1;
}
}
if(file_exists('insert.php') && file_exists('edit.php') && file_exists('delete.php') && $exists == 1)
{
echo '<p><b>Installation Complete</b></p>';
echo '<p>You may now use your script. Please delete this file (install.php) from your server</p>';
}
else
{
echo 'Table and files do not exist';
}
This is supposed to check if the table 'reviews' exists but all it returns is this error:
Warning: Unable to jump to row 0 on MySQL result index 2 in /mnt/web_g/d35/s11/b01cfcce/www/reviews/install.php on line 54