comment

Action executed in 0.000

Database with Inheritance

tags:
It's nice that i have a database with inheritance. It let's me extend posts with articles and polls. This morning in the shower i had a great idea.
Instead of this RS = select id from post limit 6 foreach Row in RS Post = new post() Post->select( Row->id ) write( Post->toHtml() ) I'll do this. RS = select type, id from post limit 6 foreach Row in RS Post = new Type() Post->select( Row->id ) write( Post->toHtml() ) This version really exemplifies the polymorphism.
parent post: TrickleUp is Active
notify me: yes

Comments

none yet

Post a Comment

* indicates a required field
anonymous (If you want to identify yourself, please sign in first.)
required This field is required.

Max size is 2 MB, aspect ratio 3:4 width:height
required This field is required.
Please include a short description.
required This field is required.

480 characters remaining.
is public

(Use this field if you have to. 3000 characters remaining.)
2 nickels, 1 quarter, 1 dime + 100

Trackback URL

http://derocher.org/~brian//trackback.php?ParentId=198

form