> 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 above would evaluate as _true_ 100% of the time because irregardless of success of the query, $result is getting a value. It's just like doing: $i = "joe"; if( $i = "bob" ) { // this will always run. } Again, I could be wrong but don't think I am. Chris
- [PHP] RE: [PHP-DB] Best way to check if a query succeed... Boget, Chris
- Re: [PHP] RE: [PHP-DB] Best way to check if a quer... Nick Davies
- [PHP] Re: [PHP-DB] Re: [PHP] RE: [PHP-DB] Best... Terry Romine
- RE: [PHP] RE: [PHP-DB] Best way to check if a quer... Boget, Chris
- Re: [PHP] RE: [PHP-DB] Best way to check if a ... Stuart J. Browne
- Re: [PHP] RE: [PHP-DB] Best way to check if a quer... Boget, Chris
- Re: [PHP] RE: [PHP-DB] Best way to check if a ... Christian Reiniger