Problem after moving code to new server
Posted: Wed Oct 06, 2004 3:56 pm
I have recently moved my web application to a shared hosting server running Apache and MySQL from my local Windows 2000 IIS/PHP/MySQL machine. After the move, most of my application works fine, but I am receiving the following message.
(line 23 is "while($row_hour...")
Below is my code:
-------> Included file for connection
-------> File where error occurs
I just don't understand because the versions of PHP are very similar and the rest of the application runs perfectly. This code is included inside of another main reports.php file which runs a case statement to pull this report file.
Anyone have any ideas what environment variables I can look at?
feyd | added
Code: Select all
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/website/public_html/webapp/reports_laborerweeklydetail.php on line 23Below is my code:
-------> Included file for connection
Code: Select all
<?
session_start();
$db="database_name";
$link = mysql_connect("localhost", "webuser", password") or die ("Could not connect");
mysql_select_db("database_name",$link)
?>Code: Select all
$GLOBALS[rowflag] = "ON";
$sqlquery = "SELECT workdate,description,hours FROM HS00001 WHERE rowid=(".$GLOBALS[rowid].")";
$result = mysql_query($sqlquery,$link);
while($row_hour=mysql_fetch_array($result))
{ DO STUFF }I just don't understand because the versions of PHP are very similar and the rest of the application runs perfectly. This code is included inside of another main reports.php file which runs a case statement to pull this report file.
Anyone have any ideas what environment variables I can look at?
feyd | added
Code: Select all
andCode: Select all
tags[/color]