The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

It is not impossible to have models represented by joins, even in moderately complex systems. But if such models are needed on a regular basis they're much better represented in the DB itself using a view, which can be easily accessed as a standard table.

Does this 'database view' have to actually be located in the database, or could I maybe create a view class that works like a table data gateway, except instead of accessing a table, it accesses a specific group of tables? Or is there some reason why that wouldn't work?

Originally Posted by Mastodont

vbmenu_register("postmenu_3607535", true);Query functions return results (as resource). If you convert them into arrays, you need to traverse this raw array for the second time to get formatted output.

IMHO is better pass directly results, although you have to write formatting objects for each type of db separately.

I have data that takes two queries to compile. Can I save both of these resources and access each without affecting the other?