On Friday 23 January 2004 09:38, Chris W. Parker wrote:

> <?php
> function query($sql, $current_line)
> {
>   $this->Result = mysql_query($sql) or die($this->stop($current_line));
>
>   if(!$this->Result)
>   {
>     echo mysql_error();
>   }

The if-clause will never be evaluated because if there had been an error your 
program would have dieded on the previous line.

> How is it possible that I'm getting the following errors?
>
> Warning: mysql_num_fields(): supplied argument is not a valid MySQL
> result resource in /home/cparker/www/schedulevark/lib/classes/db.php on
> line 127
>
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> resource in /home/cparker/www/schedulevark/lib/classes/db.php on line
> 130
> success!
>
> I can't figure it out! It sure looks like a valid MySQL result to me! Oh

I'm sure if php tells you it's invalid you can bet your *** it's invalid! 
Check for errors and report with mysql_error() after _each_ and _every_ call 
to the mysql_* functions.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
If you sow your wild oats, hope for a crop failure.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to