Ver Mensaje Individual
  #3  
Antiguo 04-03-2008
Avatar de StartKill
StartKill StartKill is offline
Miembro
 
Registrado: ene 2004
Posts: 299
Reputación: 21
StartKill Va por buen camino
Es una de las pregunta que me hice al empezar con Delphi for PHP.
Original de nuestro amigo rev
Código PHP:
/*1ro.-
Mi duda es: ¿como podria pasar el resultado de una query a una variable
utilizando los objetos de delphi php?

Con una Label hice esto y me mostraba el resultado correctamente... :*/
$this->Label1->DataSource $this->Datasource1;
$this->Label1->DataField="cuenta";
/*Pero si utilizo una variable en lugar del Label... me devuelve la "Id" del
Objeto :S */

/*2do.-
yeah! he conseguido algo, este es el codigo que utilizo:*/

$aux=$this->Query1->readFields();
$this->Label3->Caption=$aux["cuenta"]; 

Prueba con esto;
Código PHP:
//$aux=$this->Query1->readFields();
$aux=$this->Query1->nombre_de tu_campo;
$this->Label3->Caption=$aux

o en una sola linea
Código PHP:
//$aux=$this->Query1->readFields();
$this->Label3->Caption=$this->Query1->nombre_de tu_campo
Your friend

Startkill
Lima-Perú
Responder Con Cita