Ver Mensaje Individual
  #14 (permalink)  
Antiguo 29/08/2012, 09:29
Avatar de protoameeba
protoameeba
 
Fecha de Ingreso: septiembre-2005
Mensajes: 195
Antigüedad: 19 años, 5 meses
Puntos: 3
Respuesta: if en mysql????

all rifgt friends @mr_mojo_risin gracias tio! y @minombreesmm acabo justo ahora de hacer esto y funciona, obviamente es un boceto...hay que hacerlo bonito y poniendo las variables pertienentes, pero funciona y es un prototipo justo delo que necesitaba, echale un vistazo y me cuentas:

Código PHP:
Ver original
  1. $sql2 = "SELECT money, budget,
  2. if(money='USD',budget,if(money='ZAS','ahora_si',if(money='EUR','yepale',0))) as budget
  3. FROM anuncios WHERE id='327'";
  4. $consulta12 = mysql_query($sql2) or die ("No se pudo ejecutar la consulta");
  5. While ($registro12=mysql_fetch_array($consulta12))
  6. {
  7. echo $registro12["name"];
  8. echo "<br/>";
  9. echo "kk=".$registro12["budget"];
  10. }

el tema es que funciona...
__________________
Ser libre no es hacer lo ke uno kiere, sino kerer lo ke uno hace....