Ver Mensaje Individual
  #6 (permalink)  
Antiguo 19/11/2009, 15:30
Avatar de dcreate
dcreate
 
Fecha de Ingreso: octubre-2009
Ubicación: Veracruz
Mensajes: 536
Antigüedad: 15 años, 3 meses
Puntos: 22
Respuesta: Pasando una consulta a una variable PHP

bueno, se me ocurre algo asi:

Código php:
Ver original
  1. $bus=mysql_query("select *from tabla where campo='condicion'");
  2. $cons=mysql_fetch_array($bus);
  3.  
  4. if($cons['campo']==0){
  5. mysql_query("UPDATE tabla SET campo=1 WHERE campo2='condicion'");
  6. }

haber si eso es algo parecido a lo q quieres