Re: Problema con mysql_affected_rows
| From: | Andres Ferrando | Date: | Thu, 10 Oct 2002 17:35:43 +0000 |
| Subject: | Re: Problema con mysql_affected_rows | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-27922@lists.php.net to get a copy of this message | ||
leiste la parte que dice:
mysql_affected_rows() returns the number of rows affected by the last INSERT, UPDATE or DELETE query
associated with link_identifier. If the link identifier isn't specified, the last link opened
by mysql_connect() is assumed.
vos estás usando el del query, en vez del del connect ...
> Una consulta, alguien ve algun error en este codigo, el insert se efectua
> sin problema ya que voy a mi phpmyadmin y veo el registro ingresado, pero el
> if me tira siempre rechazado:
>
> $ergo = mysql_pconnect($hostname_ergowear, $username_ergowear,
> $password_ergowear) or die(mysql_error());
> mysql_select_db($database, $ergo);
> $insertSQL = mysql_query("INSERT INTO webpay(".substr($insert_text,
> 0, -1 ).") VALUES(".substr($value_text, 0, -1 ).")") or die( "No se
> puede
> consultar la base de datos contactar");
> if (mysql_affected_rows($insertSQL)){
> }else{
> echo "RECHAZADO";
> return;
> }
>
> Estuve leyendo el manual en la siguiente direccion
> http://www.php.net/manual/en/function.mysql-affected-rows.php
> para ver si
> tenia algun problema, pero no entendi el primer comentario, estare
> cometiendo algun error?
>
> De ante mano gracias
>
> Julio
--
Andres Ferrando <anferr@mecon.gov.ar>