Problem with mysql_affected_rows

From: Date: Mon, 09 Nov 1998 13:37:13 +0000
Subject: Problem with mysql_affected_rows
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-2289@lists.php.net to get a copy of this message
Hi, i'm using the mysql function mysql_affected_rows. The script that doesn't works is this: <? $result=mysql_query("UPDATE eic_labsexresumen SET grubtab='$grubtab[$i]',grubcal='$grubcal[$i]',grubtab2='$grubtab2[$i]',grubcal2='$grubcal2[$i]' WHERE idresures=$idresures AND labaleexc=$lab[$i]"); $num=mysql_affected_rows($result); if($num==0): mysql_query("INSERT INTO eic_labsexresumen VALUES(0,NOW(),$idresures,$lab[$i],'0','$grubtab[$i]','$grubcal[$i]','$grubtab2[$i]','$grubcal2[$i]')"); endif; ?> The mysql_affected_rows always returns me 0. What I'm doing wrong? Marc Muñoz marc@5500.com Barcelona -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2289) next »