Re: temporary error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2008 at 8:54 AM, Mirco Soderi <m.soderi@xxxxxxxx> 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); } ?>

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux