Hi,
i'm sorry, my english is not really good, but i try to explain my problem:
I need to update some tables by a form.
Instead of the auto-generated code I use this one:
I don't get an error message, but the updated data is not written to the database.
Has anyone an idea what's wrong with my code?
Thank you!
i'm sorry, my english is not really good, but i try to explain my problem:
I need to update some tables by a form.
Instead of the auto-generated code I use this one:
$database =& JFactory::getDBO();
$user = & JFactory::getUser();
$user_id = $user->get('id');
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);
$database->setQuery( "UPDATE #__chronoforms_1 SET (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."',
'".$_SERVER['REMOTE_ADDR']."',
Kartenmenge='".JRequest::getVar('Kartenmenge','', 'post',
'string', '' )."')
WHERE {id==$user_id} " );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
I don't get an error message, but the updated data is not written to the database.
Has anyone an idea what's wrong with my code?
Thank you!