Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mySQL question



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






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org