Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   PHP (https://www.clubdelphi.com/foros/forumdisplay.php?f=15)
-   -   Problemas al actualizar en D4PHP (https://www.clubdelphi.com/foros/showthread.php?t=62399)

Raynel 20-12-2008 19:46:51

Problemas al actualizar en D4PHP
 
Tengo un problema al querer actualizar un registro, cuando actualizo los campos, estos se duplican. He aquí el código:

Código PHP:

$adia $this->Edit1->text;$bdia $this->Edit2->text;
       
$cdia $this->Edit3->text;$atar $this->Edit4->text;
       
$btar $this->Edit5->text;$ctar $this->Edit6->text;
       
$anoc $this->Edit7->text;$bnoc $this->Edit8->text;
       
$cnoc $this->Edit9->text;$zdia $this->ComboBox1->ItemIndex;
       
$ztar $this->ComboBox4->ItemIndex;$znoc $this->ComboBox5->ItemIndex;
       
$this->Query1->Filter=" fecha=".$this->Database1->Param('init')." and loteria=".$this->Database1->Param('lot')."";
       
$params=array();
       
$params[]=$this->DateTimePicker1->Text;
       
$params[]=$this->ComboBox3->ItemIndex;
       
$this->Query1->Params=$params;
       
$this->Query1->Prepare();
       
$this->Query1->close();
       
$this->Query1->SQL "UPDATE loterias SET adia = '".$adia."', bdia = '".$bdia."', cdia = '".$cdia."', zdia = '".$zdia."', atarde = '".$atar."', btarde = '".$btar."', ctarde = '".$ctar."', ztarde = '".$ztar."', anoche = '".$anoc."', bnoche = '".$bnoc."', cnoche = '".$cnoc."', znoche = '".$znoc."' ";
       
$this->Query1->open();
       
$this->Label11->Caption 'El registro ya fue actualizado'

Perdonen los estoico del código y si hay sugerencias para mejorarlo, mejor. Gracias de antemano.


La franja horaria es GMT +2. Ahora son las 09:26:50.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi