Jump to content

[SOLVED] PHP Install Script


jjacquay712

Recommended Posts

im trying to make an install script to set up a database. I want to forward them to my index page if they haven't competed the install script. How could i check to see if the user has ran the install script? i was thinking of using a database to hold a boolean value to check to see of the user installed, but if the user didn't install, it would make a mysql zero rows returned error. Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/133258-solved-php-install-script/
Share on other sites

That just means that you either:

 

[*]Used the wrong, non-resource variable in mysql_fetch_*() functions

[*]You disconnected from MySQL or some other rare failure like that.

[*]You had a bad query.  This does NOT mean no rows were returned, it just means you had a syntax error.  This is the most common issue.

 

Has nothing to do with 0 rows.

<?php
//Connect
mysql_connect("localhost", "*****", "*******");
mysql_select_db("******");
//End Connect
$rows = mysql_num_rows(mysql_query("SELECT * FROM cvbxcbxcb"));
echo $rows;
?>

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/johnj/public_html/test.php on line 6

 

it prints that warning when the table doesn't exist

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.