Re: temporary error

From: Date: Thu, 21 Feb 2008 14:44:41 +0000
Subject: Re: temporary error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269786@lists.php.net to get a copy of this message
On Thu, Feb 21, 2008 at 8:54 AM, Mirco Soderi <m.soderi@alice.it> wrote: > Consider the following code: > > $sqlQueryInserimentoDatiAllenamentoCalciPiazzati = "INSERT INTO ... etc etc > ...." > $queryInserimentoDatiAllenamentoCalciPiazzati = > mysql_query($sqlQueryInserimentoDatiAllenamentoCalciPiazzati); > if($queryInserimentoDatiAllenamentoCalciPiazzati) { // do something } [snip!] Holy crap, so much for compact and clean code. It must take you days to write a script! ;-P In any case, there are a ton of syntax errors in your second block of code. Missing closing brackets, semicolons, et cetera. It shouldn't even compile (fatal errors). Also, after rewriting all three blocks of code so that I could read them without having a seizure, it looks like it's a problem with your database. Unless you're actually trying to see if $sqlQueryInserimentoDatiAllenamentoCalciPiazzati is true (in block #2), which you just defined as an SQL statement, whereas you're trying to see if $queryInserimentoDatiAllenamentoCalciPiazzati is true (in block #3), which you just defined as a resource identifier. -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?>

« previous php.general (#269786) next »