Jump to content

Need opinion on Design Issue


sandeep529

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.