Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/12/2010, 10:08
Avatar de anacona16
anacona16
 
Fecha de Ingreso: marzo-2010
Ubicación: Bogota DC
Mensajes: 610
Antigüedad: 14 años, 2 meses
Puntos: 52
Respuesta: Problema con consulta a campo utilizando PDO

Segun este ejemplo, si funciona

Código PHP:
<?php
$sth 
$dbh->prepare("SELECT name, colour FROM fruit");
$sth->execute();

/* Fetch the first column from the next row in the result set */
print("Fetch the first column from the next row in the result set:\n");
$result $sth->fetchColumn();
print(
"name = $result\n");

print(
"Fetch the second column from the next row in the result set:\n");
$result $sth->fetchColumn(1);
print(
"colour = $result\n");
?>
¿como podria hacerlo? ¿Que funcion puedo utilizar?

Gracias