php-general | 2001032
Date: 03/30/01
- Next message: Craig Cameron: "[PHP] HELP WITH SHIPPING MODULE"
- Previous message: elias: "Re: [PHP] Good Free PHP Editor - And it's not Edit Plus!"
- In reply to: Boget, Chris: "RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Friday 30 March 2001 16:25, you wrote:
> > Wouldn't doing it like this however be ok:
> > if ($result = mysql_query($query)) {
>
> I could be wrong, but I do not believe so. The
You are wrong :)
($result = mysql_query(...))
assigns a value to result, and the entire expression evaluates to that
value (i.e. the return value of mysql_query).
> if( $i = "bob" ) {
> // this will always run.
yes, because "bob" evaluates to true :)
>
> }
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Even idiots can handle computers, and many do.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Craig Cameron: "[PHP] HELP WITH SHIPPING MODULE"
- Previous message: elias: "Re: [PHP] Good Free PHP Editor - And it's not Edit Plus!"
- In reply to: Boget, Chris: "RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

