Hi all -
This is kicking my butt. I have searched everywhere I can think of and have tried the various solutions to no avail.
First I am connecting to two databases on the same instance of mySQL using :
$conn2 = mysql_connect ( "XXX.XX.XX.13", "User1", "PWord1",true) or die("Could not connect to the database." . mysql_error());
$conn1 = mysql_connect ( "XXX.XX.XX.13", "User2", "PWord2",true) or die("Could not connect to the database." . mysql_error());
mysql_select_db("database1", $conn2) or die("There has been a database error.");
mysql_select_db("database2", $conn1) or die("There has been a database error.");
Second I run this query and return the results:
$result = mysql_query("SELECT FileLocation, RecID, WidgetKey,
Options, More FROM tbl_user_widgets uw JOIN tbl_widgets w
ON uw.widget=w.recid WHERE pos3=1 AND EmpID='$empID'
AND ColumnID=2;", $conn1);
while ($rowArray = mysql_fetch_array($result)) {
$key=$rowArray['WidgetKey'];
$WidgetID=$rowArray['RecID'];
$options=$rowArray['Options'];
$more=$rowArray['More'];
include($rowArray['FileLocation']);
}
After the FIRST record is returned I get the following:
Warning: mysql_fetch_array(): 38 is not a valid MySQL result resource in...
I always get one record, but only one and mysql_error() is empty.
I am befuddled and ready to take a hammer to the harddrive.