# [EMAIL PROTECTED] / 2007-04-09 15:29:01 -0700:
(I'm dealing with PHP4.)
class User
{
var id;
var name;
var email;
var balance;
var accrual;
var is_manager;
function User($user_id)
{
$this-id = $user_id;
On Monday, April 09, 2007 4:24 PM Jochem Maas
mailto:[EMAIL PROTECTED] said:
Ok. I see what you're saying. If I populate all that data during the
constructor why would I ever call the function again right?
you could refresh the data if needed - but basically the idea is
to cut down the user
Hello,
I'm working on a project now and I'd like to get some feedback on how to
implement a proper class (or two).
This is an application that records an employee's used vacation time.
There are two tables: (1) events, (2) users.
Users:
id (int)
name (varchar)
email (varchar)
balance
Chris W. Parker wrote:
Hello,
I'm working on a project now and I'd like to get some feedback on how to
implement a proper class (or two).
This is an application that records an employee's used vacation time.
There are two tables: (1) events, (2) users.
Users:
id (int)
name
On Monday, April 09, 2007 3:51 PM Jochem Maas
mailto:[EMAIL PROTECTED] said:
Thanks for the response Jochem.
Chris W. Parker wrote:
[snip]
you probably only want one DB call to
populate the User object with all the relevant
user data at the point where the object is created.
[snip]
Ok. I
Chris W. Parker wrote:
On Monday, April 09, 2007 3:51 PM Jochem Maas
mailto:[EMAIL PROTECTED] said:
Thanks for the response Jochem.
Chris W. Parker wrote:
[snip]
you probably only want one DB call to
populate the User object with all the relevant
user data at the point where the
6 matches
Mail list logo