Welcome Guest, Not a member yet? Register   Sign In
Using pagination class with join and where?
#1

[eluser]mdriscol[/eluser]
Hey guys/gals. I'm having some trouble figuring out how to do a pagination with a query that has two joined tables.

It's for an image gallery so the first table is for the gallery name called "gallery_event" and id and the second table is for the photos called "gallery_photo".

So photos are associated with a gallery.

I want to display 3 events on a page and all the photos associated with the gallery event. The photos have a column named "id_event" so it will join "id_event" with the "id" column from "gallery_event".

If I just use countall, it seems I can only count the total entries of one table but I need to know the total entries of 3 events plus all the photos joined with the same ID as the event id that I have assigned for the gallery.

How can I accomplish this? Let me know if its confusing.


Messages In This Thread
Using pagination class with join and where? - by El Forum - 05-23-2008, 04:33 PM
Using pagination class with join and where? - by El Forum - 05-26-2008, 12:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB