1

I have 3 dropdwons for day month and year. I was combining them till recently to save date_of_inspection in the db in mysql format. I was using the Day, month and year cakephp form helpers.This is what i was doing

$this->data['Cabinet']['date_of_inspection'] =
    $this->data['Cabinet']['date_of_inspection']['year'].'-'.
    $this->data['Cabinet']['date_of_inspection']['month'].'-'.
    $this->data['Cabinet']['date_of_inspection']['day'];

I removed the above line and still the date was being stored in mysql date format. How come ?? Does cakephp do it.

1 Answer 1

1

In short, yes. Date and time "subarrays" are automatically deconstructed as part of the save process.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.