Update Problem
Hello
I have problems with the update function.
I do NOT want to update via a form, but change a record after a database query. After a calculation, the changed record should be written back to the database.
So far I have not managed to change the record.
//What do I have to select here in WebAssist?
I could not find anything in the help functions.
Other options are displayed.
I have sent you my update code.
Can get some help me further?
<?php
$status=1;
$freelog= 5 ;
$freelog=$freelog -1;
if ($freelog == 0) {
$status = 0;
}
$freelogins = $freelog;
?>
<?php
if (false) {
//What do I have to choose here in WebAssist?
$UpdateQuery = new WA_MySQLi_Query($db_conn);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "voodoo_kunden";
$UpdateQuery->bindColumn("id_kund", "i", "", "WA_DEFAULT");
$UpdateQuery->bindColumn("last_enter", "t", "", "WA_DEFAULT");
$UpdateQuery->bindColumn("free_logins", "i", "".($rs_vooKund->getColumnVal("free_logins")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("total_logins", "i", "".($rs_vooKund->getColumnVal("total_logins")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("status", "i", "", "WA_DEFAULT");
////What do I have to choose here in WebAssist?
$UpdateQuery->addFilter("id_kund", "=", "i", "".($_GET['id_kund']) ."");
$UpdateQuery->execute();
$UpdateGoTo = "../ListeBeschwoerung.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>