PDA

View Full Version : help on php +MySQL


balljai
10-08-2002, 07:22 PM
Hello all expert,

I am new to php and MySQL. Couple days ago, I opened an account with a freewebspace provider which support PHP4 and MySQL. I have also downloaded a PHP guestbook from a site and tried to install it with the following procedures.

1,By using phpMyAdmin, I created a table in my Database.
2, I configured the guestbook following the guideline, and uploaded it to the site.

but when I open the guestbook, the following Warning shown on the page.

Warning: Supplied argument is not a valid MySQL result resource in /users/coolfreepage.com/enoch/guestbook/E-Guest_show.php on line 37.

and also on line 58,61,64 and 222.
I've checked the script and the problem is probably about the code "mysql_num_rows"(the first 4 lines) and "mysql_fetch_object"(line 222)

can someone tell me what is going on and how I can fix that?

mat
10-09-2002, 10:58 PM
:confused: can you post more code?


mat,

kcomer
10-10-2002, 04:45 PM
I would guess that your mysql connection isn't valid, check the config files for the guestbook and make sure the host, username and password for the mysql connection are correct. It could also be that you did not name the table the same as the query that the guestbook looks for. Post some code and your table name if you need more help.

Keith