Ver Mensaje Individual
  #7 (permalink)  
Antiguo 02/09/2009, 21:20
el_crespo
 
Fecha de Ingreso: septiembre-2008
Mensajes: 16
Antigüedad: 15 años, 7 meses
Puntos: 3
Respuesta: Despliegue de registros de mi bd en caja de texto

Hola.. mira te aconsejo que hagas haga un seguimiento de prueba y mires si se esta haciendo bien la consulta

Código PHP:
Ver original
  1. <?php
  2. include("../conec.php");
  3. $link = conectarse();
  4. $sql2="SELECT CODPDTO, NOMPDTO FROM catalogo WHERE CODPDTO='00001'";
  5. $result2=mysql_query($sql2);
  6. if(!$result2){
  7.    die("Un error ha ocurrido: "mysql_error() ); //<-- con esto sabrás si todo anda bien con la consulta
  8. }
  9. $notas=array();
  10. $data=array();
  11. while($row2=mysql_fetch_array($result2)){
  12. $key[] = $row2['NOMPDTO'];
  13. }
  14. echo 'var collection = ["' . implode('", "', $key) . '"];';
  15.  
  16. ?>