SV: [PHP-DB] Re: php/mysql error
| From: | Trond Erling Hundal | Date: | Tue, 20 Nov 2001 17:32:53 +0000 |
| Subject: | SV: [PHP-DB] Re: php/mysql error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14478@lists.php.net to get a copy of this message | ||
I agree with mr. Torrent here...
you are not logged on to your mysql server when you issue the query!
Check your password/username...
> -----Opprinnelig melding-----
> Fra: torrentUK [mailto:torrentuk@leftski.ski-info-online.com]
> Sendt: 20. november 2001 18:35
> Til: php-db@lists.php.net
> Emne: [PHP-DB] Re: php/mysql error
>
>
> I think you can get this error when you sql query fails.
> Try copy and pasting the $sql query to the mysql command line and see what
> response you get (it looks as though this would work though unless you
> haven't got a table called "test").
> I guess it might be that you are not successfully logging on (although I
> can't recall whether that would then generate this error when you try and
> issue a query or not). You should set up a "die" error path as
> well to help
> you see if you fail to log in.
>
> -torrent
>
>
>
> "Jon" <jons@dotnet.com> wrote in message
> news:Usenet.ipsiitnr@localhost...
> > please review my script
> >
> > I have already had it said that the script is fine, please check. IF
> > it is then I have a set up proiblem which I would also like help to
> > solve. BUT mysql outside of apache works fine.
> >
> > I started with an already set up apache so I don't know if mysql was
> > installed in right, but the staements before the error seem to work so
> > I would think so.
> >
> > I running my web server under red hat 7.0, I am new to apache/php and
> > mysql.
> >
> > Thanks
> >
> > ----------------------------
> >
> > I get an error when it hits the line
> >
> > while ($row = mysql_fetch_row($rs)) {}
> >
> > I know it won't do anything, just checking each command.
> >
> > For a moment I thought this means that the mysql wan't compiled in but -
> > then how comes the other mysql_ statements don't error.
> >
> > anyway the error I get is this
> > Supplied argument is not a valid MySQL result resource .......
> >
> > Now I am a C++ programmer so I am estimating here, it sounds like $row -
> > is wrong, do I need to set this up as an array (I believe that is what -
> > it is supposed to be)
> >
> > The $rs is right I am pretty sure and the command should do what I want-
> > it to do.
> >
> >
> >
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>