[thelist] Gallery3 - Using SQL queries
Todd Richards
todd at promisingsites.com
Sat Mar 20 14:55:47 CDT 2010
Hi Anthony -
Thanks for your response. What I am looking at is how to do a "previous"
and "next" link on the page with the image. I'm getting the image ok but
I'm not really super sure how to say to the database "from the images in
this album, get the next image in the table" (or previous image).
Does that make sense?
Todd
-----Original Message-----
From: Anthony Baratta [mailto:anthony at baratta.com]
Sent: Saturday, March 20, 2010 1:54 PM
To: todd at promisingsites.com; thelist at lists.evolt.org
Subject: Re: [thelist] Gallery3 - Using SQL queries
On 3/20/2010 8:57 AM, Todd Richards wrote:
> - Id (record id)
> - Name (such as the name of the album (ie "my-album" or "image.jpg"))
> - Parent_id (the id of the album that the images belong to)
> - Relative_path_cache (ie "my-album/image.jpg")
> - Relative_url_cache (ie "my-album/image)
> - Slug (ie "my-album" or "image")
> - Type (photo or album - it also allows for videos)
> - View count (number of hits)
Something like this?
select
Image.Relative_path_cache
from <table> as Image
join <table> as Album on
Image.Parent_Id = Album.Id
where
Image.Name = @Name
AND
Album.Name = @Album
Is that what you are looking for?
--
Anthony Baratta
Freedom is messy.
-- Mark Steyn
More information about the thelist
mailing list