RE: My Project

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

 



> Lots of extra characters in that one... try this:
> > 
> > $q=mysql_query("update myTable set myMoney=(myMoney-10) where 
> > myCharacter='characterName'");
> > if(!$q){echo mysql_error();}
> 
> so wasteful :-)
> 
> $q=mysql_query("update u set m=(m-10) where 
> c='$c'");if(!$q)die(mysql_error());
> 

Still wasteful.  How about 

$q=mysql_query("update u set m=(m-10) where c='$c'") or die(mysql_error());

:) 

JM

-- 
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