Codeigniter validating dates
For people just getting started, things probably look a little daunting.Code Igniter's model handling is fairly straightfoward and basically allows you to mimic a standard SQL query with a few straightforward commands like these examples: You can also create a model object, load it in and build custom methods to handle a custom task.They both attempt to create an MVC architecture which simply means they separate the (data) Model from the Controller (which pulls data from the model to give to the view) from the View (what the user sees).They both use Routing which takes a URL and maps it to a particular function within a controller (Cake PHP calls these actions).Code Igniter supports regular expressions for routing, whereas you'll have to wait until Cake PHP 1.2 for that feature.They both support Scaffolding which is an automated way of generating a view based on the model.
Data validation in Code Igniter is handled via a validation class.
You'd want to do this in the model and not the controller to help isolate code into the MVC silos.
Cake PHP takes a slightly different route by automatically loading in the model that matches the current controller (controllers tend to be named similarly to the models they are associated with).
Scaffolding is meant for simple prototyping and Code Igniter takes it a step further by requiring a keyword in the URL to even access the scaffolding.
I'm guessing one could omit the keyword, leaving this feature essentially optional.
For example, assuming I'm in a controller named I chose this particular query because it shows two different concepts.