mysql_fetch_row win32 to Linux
| From: | sundogcurt | Date: | Sat, 12 Jan 2002 18:45:42 +0000 |
| Subject: | mysql_fetch_row win32 to Linux | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80300@lists.php.net to get a copy of this message | ||
Hi everybody, I have some scripts running on win32 Apache mySQL and they all run great. I have copied the entire application to my Linux box which I think I have running pretty smoothly now. The database is there and I can access it just fine etc etc.
Here is the hitch (there's always a hitch) I can't get PHP to retrieve my data after a SELECT query. I know the query works simply by setting and displaying flags. It seems to choke on mysql_fetch_row. Here is an example.
Here is a snippet I have written
$myquery = "SELECT * FROM xpackage";
print "<p>myquery = $myquery</p>";
$myresult = mysql_query($myquery);
while($myrowz = mysql_fetch_row($myresult)){
print "<p>" . $myrowz[0] . "</p>";
}
On the win32 box (identical snippet and identical db on both machines) I get this back
myquery = SELECT * FROM xpackage
62
61
60
59
58
57
56
55
54
53
115
114
127
126
111
125
On the Linux box I get this
myquery = SELECT * FROM xpackage
Warning: Supplied argument is not a valid MySQL result resource in /path to page with error/default.php on line 5
Line 5 is this part
while($myrowz = mysql_fetch_row($myresult)){
I am at a total loss, I have not seen anywhere stating that mysql_fetch_row is depreciated, does anybody have anything to add to this to help me out?