I need help QUAD fails me I double click on the button

Login or register to post comments
No replies
Offline
Joined: 09/06/2010

Hi I have a 2-fold error followed by pressing the Save button, this happens to me in the botom is because I have 2 query Sheapparently see the code:

protected function btnSave_Click() {
$objUsuarios=Usuario::LoadById(intval($_SESSION['userid']));
$usuario=$objUsuarios->Login;
$id=$_SESSION["id"];

$objDatabase = Gestion::GetDatabase();
$mixToReturn = null;
$objDatabase->NonQuery('
INSERT INTO `gestion` (
`gestor`,
`idcliente`,
`comentario`,
`status`

) VALUES (
' ."'".$usuario."'".',
' .$id. ',
' .$objDatabase->SqlVariable($this->txtObservacion->Text) . ',
' .$objDatabase->SqlVariable($this->txtstatus->SelectedValue) . '
)
');

//Actualizar el campo estado:En gestion

$objDatabase = Cliente::GetDatabase();

$objDatabase->NonQuery('
UPDATE
`cliente`
SET
`status` = ' .$objDatabase->SqlVariable($this->txtstatus->SelectedValue) . '
WHERE
`id` = ' . $id. '');

QApplication::Redirect("gestion.php");
}

please i need help :(