Hi..!
I am new to cakephp,how to conver the following qyery in to cakephp
please any can help me out.
$timem _out = date('H:i:s');
$date = date('Y-d-m');
UPDATE Timesheets SET time_out = '$time_out' WHERE id = '2' AND date =
'$date';
thanks in advance...!
Actually this is my for data.
----------------------------------------
<?php
$user_id = $userId;
$date = date('Y-d-m');
$time_in = date('H:i:s');
$time_out = date('H:i:s');
$time="00:00:00";
if($cOutCheck!=0) {
e($form->create('Timesheet',
array('action' => 'clockout')));
e($form->hidden('user_id',array('value'=>
$user_id)));
e($form->hidden('time_out',array('value'=>
$time_out )));
e($form->hidden('date',array('value'=>
$date)));
e($form->submit('Clock Out'));
e($form->end());
}
else {
echo "Clock Out";
}
?>
----------------------------------------------------------------------------------------------------
here i need to write that update code please help me out
function clockout() {
$this->Timesheet->create();
$currentdate=$this->data['Timesheet']['date'];
$id=$this->data['Timesheet']['user_id'];
echo "here we want to update the time_out field using this id
(".$id.") and current date ".$currentdate;
}
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en