Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/09/2007, 20:46
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: Orientacion con el uso de transacciones

Mas bien tienes que hacer un Query por cada comando:
Código PHP:
mysql_query("SET AUTOCOMMIT=0"$enlace);
mysql_query("START TRANSACTION"$enlace);
// mas querys
$result mysql_query"DELETE FROM tabla1 WHERE id=10" );
if( !
$result ) {
      
mysql_query"ROLLBACK" );
}

$result mysql_query"DELETE FROM tabla2 WHERE id=10" );
if( !
$result ) {
      
mysql_query"ROLLBACK" );
}

mysql_query"COMMIT" ); 
Saludos.