php4.0.5 win32
I have a page called results.php. Short but with any
number of 12 include files depending on the logic
flow. The first include file is a config file
include("config.fil");
that contains all the variables to run the app.,
included is :
$MYSQL_LINK=mysql_connect($host,$uName,$pWord);
(All the necessary variables are declared before
$MYSQL_LINK)
Four different includes use this variable to get info
from the same table and db no problem.
When I get down to one of the last includes, I get the
following error message
"1 is not a valid MySQL-Link resource"....etc in
fulldisplay.php
so I added the following to fulldisplay.php before the
call to the db
print $MYSQL_LINK;
mysql_select_db($dbName,$MYSQL_LINK);
It returned:
Resource id #1
Warning: 1 is not a valid MySQL-Link resource
in...etc the script completes but with the warning
message
Now if I take this include and insert
include("config.fil");
at the top of this include file.
I get...Resource id #9 and the script runs correctly
to completion, no warnings no problems.
I can't even begin to understand why the variable
$MYSQL_LINK runs correctly in all the includes except
fulldisplay.php unless I include the config file for
the second time. By way of note, all the other
varaibles defined in the config file are available in
fulldisplay.php without including the config fle for a
2nd time.
rm
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]