Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Brian Waskiewicz

I set it up so that I check the query for errors, and there are none.  It is
pretty random - sometimes the page works, and sometimes it doesn't, for no
apparent reason.  I haven't changed anything on the database side.

Thanks.

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Sunday 31 March 2002 02:02, Brian Waskiewicz wrote:
> > My page works fine from other computers - it just doesn't work from
mine.
> > I think it could be that the page is caching and IE6 isn't getting a new
> > copy. How can I prevent it frlom caching? I've tried clearing my
history,
> > but I still get the error.
> >
> > Thanks.
> >
> > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > > Always always always check your queries for errors before trying to
use
> > > the result set.
> > >
> > > ie.
> > >
> > >   $result = mysql_query($sql) or die(mysql_error());
> > >
> > > (assuming you want a query failure to be a fatal error)
>
> Hmmm, Rasmus has given you some very good advice. Please follow it. No
point
> speculating on how to correct the problem if you don't know what the
problem
> is.
>
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> The trouble with computers is that they do what you tell them, not what
> you want.
> -- D. Cohen
> */



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




Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Jason Wong

On Sunday 31 March 2002 02:02, Brian Waskiewicz wrote:
> My page works fine from other computers - it just doesn't work from mine. 
> I think it could be that the page is caching and IE6 isn't getting a new
> copy. How can I prevent it frlom caching? I've tried clearing my history,
> but I still get the error.
>
> Thanks.
>
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > Always always always check your queries for errors before trying to use
> > the result set.
> >
> > ie.
> >
> >   $result = mysql_query($sql) or die(mysql_error());
> >
> > (assuming you want a query failure to be a fatal error)

Hmmm, Rasmus has given you some very good advice. Please follow it. No point 
speculating on how to correct the problem if you don't know what the problem 
is. 



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The trouble with computers is that they do what you tell them, not what
you want.
-- D. Cohen
*/

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




Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Brian Waskiewicz

My page works fine from other computers - it just doesn't work from mine.  I
think it could be that the page is caching and IE6 isn't getting a new copy.
How can I prevent it frlom caching? I've tried clearing my history, but I
still get the error.

Thanks.

"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Always always always check your queries for errors before trying to use
> the result set.
>
> ie.
>
>   $result = mysql_query($sql) or die(mysql_error());
>
> (assuming you want a query failure to be a fatal error)
>
> -Rasmus
>
> On Sat, 30 Mar 2002, Brian Waskiewicz wrote:
>
> > Can anyone tell me what is causing the following error:
> >
> > Warning: Supplied argument is not a valid MySQL result resource in
> > /ip/sums/www/test/admin/mailing_list.phtml on line 123
> >
> > The page will work fine one time, then I'll come back later and get the
> > error.  I won't change anything, but the page will work later on anyway.
I
> > know there's nothing wrong with the database server, and the query
should
> > return results.
> >
> > Thanks.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Rasmus Lerdorf

Always always always check your queries for errors before trying to use
the result set.

ie.

  $result = mysql_query($sql) or die(mysql_error());

(assuming you want a query failure to be a fatal error)

-Rasmus

On Sat, 30 Mar 2002, Brian Waskiewicz wrote:

> Can anyone tell me what is causing the following error:
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /ip/sums/www/test/admin/mailing_list.phtml on line 123
>
> The page will work fine one time, then I'll come back later and get the
> error.  I won't change anything, but the page will work later on anyway.  I
> know there's nothing wrong with the database server, and the query should
> return results.
>
> Thanks.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Not a valid MySQL resource?

2002-03-30 Thread Brian Waskiewicz

Can anyone tell me what is causing the following error:

Warning: Supplied argument is not a valid MySQL result resource in
/ip/sums/www/test/admin/mailing_list.phtml on line 123

The page will work fine one time, then I'll come back later and get the
error.  I won't change anything, but the page will work later on anyway.  I
know there's nothing wrong with the database server, and the query should
return results.

Thanks.



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