Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/06/2010, 21:30
phpdev
 
Fecha de Ingreso: junio-2010
Mensajes: 4
Antigüedad: 13 años, 10 meses
Puntos: 0
Respuesta: Problemas con select Like en php y mysql

Lo de la imprecion lo hice y hace bien el sql e inclusive eso copie al phpmyadmin y lo ejecut sin drama, el codigo de imprecion

if(!isset($_GET['sql'])){
$query=mysql_query("select * from usuarios order by nombre, user ASC") or die(mysql_error());
}else{
$query=mysql_query($_GET['sql']);
}
while($fila=mysql_fetch_array($query)):
$query2=mysql_query("select text from cargos where id ='".$fila['cargo']."'");
$resul=mysql_fetch_array($query2);
$strcargo=$resul['text'];
$query2=mysql_query("select nombre from proyectos where id ='".$fila['proyecto']."'");
$resul=mysql_fetch_array($query2);
$strproyecto=$resul['nombre'];
if($strproyecto==''){
$strproyecto="<font color=\"#FF0000\"><b>NO TIENE PROYECTO </b></font>";
}
?>
<tr>
<td height="47"><?php echo($fila['id'])?></td>
<td><?php echo($fila['Nombre'])?></td><td><?php echo($fila['user'])?></td> <td><?php echo($strcargo)?></td>
<td><?php echo($strproyecto)?></td>
<td width="74"><form name="form2" method="post" action="contenido.php?opcion=7">
<input type="submit" name="Submit2" value="Borrar">
<input type="hidden" name="hidden2" value="<?php echo($fila['id'])?>">
</form></td>
</tr>
<?php endwhile; ?>