|
|||
|
Hello everybody,
The example below should demonstrate quite clearly my issue. Assuming that I have in my DB the following table : Code:
CREATE TABLE `users` (
`userid` INT NOT NULL,
`username` VARCHAR( 50 ) NOT NULL,
`avatar1` INT, -- ID of the 1st avatar picture or NULL
`avatar2` INT, -- ID of the 2nd avatar picture or NULL
`avatar3` INT -- ... (3 pictures max allowed)
) ;
So I'd like to access my avatar data as an array : PHP Code:
I already found those two tutorials, and they seem quite interesting. I'm looking forward to any other suggestions ! Regards elvex |
|
|||
|
Sorry, but I don't clearly understand your questions, however you should read something about OOP (object oriented programming :P), ORM and programming patterns, like Active Record or Table Data Gateway, Row Data Gateway, DAO (Data Access Object), etc.
Also read some on offical ZF's manual about Zend_Db (as I remember it's build upon a clear example of bug tracking application) Quote:
|
|
|||
|
Well, I sure have to read a lot...
Quote:
Is the array returned by Menu::getMenu() stored somewhere when the row is instancied, or is it created just on demand (when the method is called) ? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|