Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I think I missed something in my PHP journey. Are there no static object methods in PHP (prior to 5, which I haven't even looked into yet)? I'm trying to wrap objects around my DB tables and giving each a select($id) method that is called on the class level and returns an instance... IE:
[code]$myAcct = Accounts->Select($id);[/code]
Is that not possible? Is there a workaround that's not more complicated than it's worth? I'm trying to avoid a DB wrapper class that's nothing but a series of variously named functions like selectAccount($id), selectUser($id), ...
Any help would be appreciated.
0 · ·