Welcome Guest, Not a member yet? Register   Sign In
Database Update Question
#4

[eluser]eggshape[/eluser]
I took an alternative approach. I saved the id of the target table to the cookie (and sessions table) and used an inherited method to update the table.

Note, this involves modifying the Sessions class to accept non-default fields and the Model superclass, so that any derived classes inherit the method. In each model's constructor, I retrieve the id and place it in a protected property. So when I call $this->$model->update(), there is no need to pass arguments and retrieve hidden-data.


Messages In This Thread
Database Update Question - by El Forum - 12-12-2007, 10:51 AM
Database Update Question - by El Forum - 12-12-2007, 10:58 AM
Database Update Question - by El Forum - 12-12-2007, 11:13 AM
Database Update Question - by El Forum - 12-12-2007, 11:14 AM
Database Update Question - by El Forum - 12-12-2007, 11:40 AM
Database Update Question - by El Forum - 12-12-2007, 11:45 AM
Database Update Question - by El Forum - 12-12-2007, 11:52 AM
Database Update Question - by El Forum - 12-12-2007, 11:54 AM
Database Update Question - by El Forum - 12-12-2007, 12:04 PM
Database Update Question - by El Forum - 12-12-2007, 12:31 PM
Database Update Question - by El Forum - 12-12-2007, 12:36 PM
Database Update Question - by El Forum - 12-12-2007, 01:24 PM
Database Update Question - by El Forum - 12-12-2007, 01:44 PM
Database Update Question - by El Forum - 12-12-2007, 01:56 PM
Database Update Question - by El Forum - 12-12-2007, 02:05 PM
Database Update Question - by El Forum - 12-12-2007, 02:29 PM
Database Update Question - by El Forum - 12-12-2007, 02:36 PM
Database Update Question - by El Forum - 12-12-2007, 05:58 PM
Database Update Question - by El Forum - 12-12-2007, 07:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB