2
The date field of my application is entering the values 0000-00-00 00:00:00
, however I am not able to find the file that makes the Insert,
The function you save to the bank is this:
$db = & JFactory::getDBO();
if ($db->connected()) {
$data =new stdClass();
$data->nome = $_POST['nome'];
$data->email = $_POST['email'];
$data->telefone = $_POST['telefone'];
$data->cidade = $_POST['cidade'];
$data->estado = $_POST['estado'];
$db->insertObject('database_orcamentos', $data);
Check the database to see if the date column has a default value.
– rray
It’s OK, with datetime null value NO!
– Bruno Cesar
Then the problem seems to be that the date is being converted wrong. In
insertObject()
has no clue?– rray
So, just have this line even $db->insertObject('database_orcamentos', $data); .
– Bruno Cesar
What is the name of the date column?
– rray
the column is called created
– Bruno Cesar
after assigning the status, add this line
$data->created = date('Y-m-d H:i:s');
– rray
Show buddy, thank you!!!
– Bruno Cesar