Re: MySQL Results NULL Error
| From: | Jason Stechschulte | Date: | Sun, 06 May 2001 15:38:05 +0000 |
| Subject: | Re: MySQL Results NULL Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48759@lists.php.net to get a copy of this message | ||
On Thu, Apr 12, 2001 at 10:20:28PM -0400, Chris Anderson wrote:
> If I grab values from fields and they contain nothing, and I retrieve
> them using mysql_field_array, it will give an index out of range. Is
> there a way to prevent the error or do I have to keep putting a @ in
> front of the variable declaration?
Why not just check how many rows are returned?
mysql_num_rows()
--
Jason Stechschulte
jpstech@unoh.edu
--
I wouldn't ever write the full sentence myself, but then, I never use
goto either.
-- Larry Wall in <199709032332.QAA21669@wall.org>