sandeep529 Posted April 8, 2009 Share Posted April 8, 2009 Hi, I am writing a database wrapper class.I would like an opinion on the following issue would you like to access the `name` column in the table `user` for row in which primary key =10 as $name =$db->user[10]->name; //square brackets or $name =$db->user(10)->name; Thanks, Sandeep Link to comment https://forums.phpfreaks.com/topic/153106-need-opinion-on-design-issue/ Share on other sites More sharing options...
dbo Posted April 10, 2009 Share Posted April 10, 2009 I think either would be acceptable. I'd just suggest keeping things consistent for any other classes/modules you might build. Link to comment https://forums.phpfreaks.com/topic/153106-need-opinion-on-design-issue/#findComment-806025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.