pkp
08-13-2003, 10:19 PM
Hey there, I've just begun developing objects in PHP, I'm familiar with object oriented design in general but have not attempted to create such a beast before relating to databases.
Basically, I'm curious if anyone has any tips or tutorials you could point me to regarding this:
I have a few tables, two of which are indexes for the primary table, such as:
Table 1 (Primary)
Name CityID ObjectTypeID
Josh 1 1
Mathew 2 1
Rick 1 2
Table 2 (Cities)
ID CityName
1 San Francisco, CA
2 Minneapolis, MN
Table 3 (Objects)
ID ObjectName
1 Rubber Ball
2 Harmonica
So... I want to create an object that I can use to modify and deal with Primary Table entries. The problem I run into is that I need to be able to query the city and object names, but I don't know if I should do it with seperate queries or what.
Anybody else write objects relating to pulling or related directly to a record (records) in a database?
Hope that all makes sense...
Thanks!
Basically, I'm curious if anyone has any tips or tutorials you could point me to regarding this:
I have a few tables, two of which are indexes for the primary table, such as:
Table 1 (Primary)
Name CityID ObjectTypeID
Josh 1 1
Mathew 2 1
Rick 1 2
Table 2 (Cities)
ID CityName
1 San Francisco, CA
2 Minneapolis, MN
Table 3 (Objects)
ID ObjectName
1 Rubber Ball
2 Harmonica
So... I want to create an object that I can use to modify and deal with Primary Table entries. The problem I run into is that I need to be able to query the city and object names, but I don't know if I should do it with seperate queries or what.
Anybody else write objects relating to pulling or related directly to a record (records) in a database?
Hope that all makes sense...
Thanks!