That's what I do. It makes it much easier. It makes testing easier too.<div>I made it when i extend the class, the table name is set, then I use late static binding to reference it in the base class...</div><div><br></div>
<div>Eric</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 2, 2012 at 10:26 AM, Tom Haws <span dir="ltr"><<a href="mailto:tom.haws@gmail.com" target="_blank">tom.haws@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a question/thought.<br><br>If a lot of the CRUD is repetitive (similar table structures), would it be appropriate to create a models/generic_model.php that has the generic CRUD functions/SQL and a set_table method or some other way of passing it a table name to enhance DRY programming?<span class="HOEnZb"><font color="#888888"><br>
<br>Tom<br>
</font></span><br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br></div>