This may be a little bit of a noob question but here goes.
I am assuming that Phalcon BINDS parameters automatically when data is sent to the database BUT the confusing thing is that in many places in the documentation we are advised to bind parameters.
so my code starts looking like
$device->assign(array( 'type' => $this->filter->sanitize($userData['DeviceType'],"string"), 'devID' => $this->filter->sanitize($id,"alphanum"), 'status' => $this->filter->sanitize($userData['Status'],"int"), 'assigned' => 0, 'devCreated' => $verify->isNow() , )); $device->save();
I feel as though this is ineffecient code because it is double work as phalcon will BIND the variable going in in any case.
The reason I want to do this is to prevent errors when the data comes OUT of the data base as I am not sure if Phalcon does anything to the data on
I also feel this is inffecient because I know that the database layer should be able to do this saving me having to run filter on everything.
any advice would be much appreciated.