Forum Moderators: coopster

Message Too Old, No Replies

Help with the warning problem in PHP

         

alexandrahan

4:14 pm on Aug 25, 2003 (gmt 0)

10+ Year Member




It goes very well on my pc, but not in the unix hosting server. Please see the details below:

warning:mysql_close(): 1 is not a valid mysql link resource in /mysite/cat1/search.php

Anyone had experienced such problem, I will appreciate your help!

Thanks in advance!
best regards!
Alexandra

coopster

4:32 pm on Aug 25, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It seems as though you are trying to close a MySQL link resource that is not currently open. If you open a link using mysql_connect(), then process, then close the link using mysql_close(), you should be fine. When your script ends, the link is, in most circumstances, closed automatically. To suppress the warning error, you can place an at sign (@) in front of mysql_close(). You want to double check your process flow though, it's better to write good clean code and know when your database connection is open versus closed.

alexandrahan

3:20 am on Aug 26, 2003 (gmt 0)

10+ Year Member



it works!
thank you very much!