Tema: Ayuda please
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/12/2009, 08:38
Avatar de Angelik0722
Angelik0722
 
Fecha de Ingreso: diciembre-2009
Ubicación: Colombia
Mensajes: 43
Antigüedad: 14 años, 4 meses
Puntos: 0
Ayuda please

Hola

Tengo el siguiente código:

Código PHP:
Ver original
  1. $query = $db->query("SELECT Nombre_med FROM Med_Medicamentos WHERE Nombre_med LIKE '$queryString%' LIMIT 10");
  2.                 if($query) {
  3.                     // While there are results loop through them - fetching an Object (i like PHP5 btw!).
  4.                     while ($result = $query ->fetch_object()) {
  5.                         // Format the results, im using <li> for the list, you can change it.
  6.                         // The onClick function fills the textbox with the result.
  7.                        
  8.                         // YOU MUST CHANGE: $result->value to $result->your_colum
  9.                         echo '<li onClick="fill(\''.$result->Nombre_med.'\');">'.$result->Nombre_med.'</li>';
  10.                     }

Hasta ahi el codigo funciona bien, elproblema es que necesito sacar ademas del nombre la forma farmaceutica del medicamento.
Estoy pasandome a PHP 5 y apenas estoy entendiendo, alguien que me colabore porfa.


Mil Gracias

Angelik