Mark Roedel pressed the little lettered thingies in this order...
> > -----Original Message-----
> > From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 18, 2001 2:43 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] sql query successful
> > Your statement above is checking to see if the fact that $sql
> > is equal to mysql_query("SELECT * FROM table ORDER BY rand()")
> > is TRUE, but you're using an assignment operator (=) and not a
> > comparison operator (==), so it should always return FALSE. (Can
> > you use an assignment operator in an if() statement?)
> Actually, you can. (See
> An assignment operation will return the value that was assigned.
> Thus, if we have
> if ($sql = mysql_query($query_string))
> and the mysql_query call returns a non-false value, the entire
> expression will evaluate to true.
Thank you. I've never tried to "assign" within an if() clause.
You learn 13 or 14 new things every day...
a.k.a. [EMAIL PROTECTED]
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the
dawn of Internet time (1995)
For a good time,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]