Welcome Guest, Not a member yet? Register   Sign In
save current date and time in mysql with codeigniter
#1

[eluser]ranjitbd[/eluser]
function feedbackSave()
{
$data=array();

$data['name'] = $this->input->post('lname', true);
$data['email'] = $this->input->post('email', true);
$data['comments'] = $this->input->post('comments', true);

1. $date = date('Y-m-d');
2. $time = date('h:iConfused');
3. $dateTime = $date." ".$time;

4. $data['date'] = $dateTime;

$this->load->model($this->config->item('generalModel'), 'save_feedback',TRUE);
$this->save_feedback->feedbackSave($data);

$_SESSION['feedback'] = 'Feedback send successfully';
$this->feedback();
}

hi,
i have saved current date and time in mysql using line no 1,2,3,4. this is the way i used in php raw coding.
is there any convenient way or builtin function for doing this using codeigniter..
sorry for my poor english...
thanks in advance


Messages In This Thread
save current date and time in mysql with codeigniter - by El Forum - 08-18-2009, 11:19 PM
save current date and time in mysql with codeigniter - by El Forum - 08-18-2009, 11:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB