mySQL question
Cole Tuininga
colet at code-energy.com
Wed Dec 4 16:08:04 EST 2002
On Wed, 2002-12-04 at 15:51, Mike Volmar wrote:
> Hi,
>
> In my book "PHP and mySQL Web Development" listing 10.2 has a line of code:
>
> $num_results = mysql_num_rows($result);
>
> that throws an error on linux but not on windows machine.
> error=Warning: Supplied argument is not a valid MySQL result resource
More often than not, this error is a result of a malformed query. Are
you connecting to the same database on both platforms? If not, then
perhaps you're attempting to query from a table that exists on one
database and not the other (as an example).
Something that can be of help is the mysql_errno() and mysql_error()
functions.
--
"The memory management on the power pc chip is something that should be
shown to small children when they've been especially bad." -Linus
Torvalds
Cole Tuininga
Lead Developer
Code Energy, Inc
colet at code-energy.com
PGP Key ID: 0x43E5755D
More information about the Discuss
mailing list