RE: [PHP-WIN] Error after a while???
| From: | Rich Gray | Date: | Sun, 15 Sep 2002 01:43:54 +0000 |
| Subject: | RE: [PHP-WIN] Error after a while??? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15818@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: M.B. [mailto:micb_@hotmail.com]
Sent: 14 September 2002 10:21
To: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Error after a while???
Helaas, ik dacht dat ik het had, maa helaas.
Ook dit geeft weer een fout op zichzelf.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/< URL > on line 10
Dus op 1 of andere manier moet er iets fout gaan.
Maar wat?
"Constantin Baciu" <johndoe110479@mymail.ro> schreef in bericht
news:20020912103838.46249.qmail@pb1.pair.com...
> If you do a select on that table, before retrieving the results (
> while($result_data=mysql_fetch_array($query)) ) verify that the result has
> rows
>
> ie
> if(mysql_num_rows($query)>0)
> while($result_data=mysql_fetch_array($query))
> {
> do something with the results
> }
> else
> NO RESULTS.....
>
>
>
> "Rich Gray" <richardgray@onetel.co.uk> wrote in message
> news:KOENJGNHGACBDCEIKHKAOEAOCOAA.richardgray@onetel.co.uk...
> > Can you post some code to look at?
> >
> > -----Original Message-----
> > From: M.B. [mailto:micb_@hotmail.com]
> > Sent: 11 September 2002 20:32
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] Error after a while???
> >
> >
> > Hi, I have a database and a site which has members and so on......
> > but now I have service (also for a long time)
> > http://www.wjp.cjb.net
> > a guestbook service.
> > But yesterday somebody mailt me to say that this error was on his
> > guestbooksite:
> >
> > Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> > resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
> > line 9
> >
> > Warning: mysql_fetch_object(): supplied argument is not a valid MySQL
> result
> > resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
> > line 28
> >
> >
> > I checked his table and found out that the table is empty.
> > What could there be wrong with this line of code if a table is empty?
> >
> >
> >
> > And what can I do about it.
> > It never accurred before and we tested this service a lot before we
> started
> > using it, and then there wasn''t any problem at all when a table was
> empty.
> > (PS all the fields in the table have the option that they are allowed to
> be
> > empty.)
> >
> > M.B.
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php