php ablum with thumbnail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanlove
Forum Newbie
Posts: 3
Joined: Sun Jan 26, 2014 1:29 am

php ablum with thumbnail

Post by sanlove »

please help me to code image album with thumbnail.
attached image for help.
Image
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php ablum with thumbnail

Post by Celauran »

What have you written so far? What problems are you encountering?
sanlove
Forum Newbie
Posts: 3
Joined: Sun Jan 26, 2014 1:29 am

Re: php ablum with thumbnail

Post by sanlove »

if one user has different services and each service has multiple images.
example id user-1 has 2 services, service-1 and service-3. output will be


output from query
service1 userid1 image1
service1 userid1 image2
service1 userid1 image3
service3 userid1 image1
service3 userid1 image2
service3 userid1 image3 etc.

using php code i need to display
service1 userid1 (image1,image2,image3) then
service3 userid1 (image1,image2,image3)

please help. (need PHP/mysql code)
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php ablum with thumbnail

Post by Celauran »

I understand the requirements. I'm asking you what code you've written so far and where you're running into problems. Nobody here is going to do your homework for you.
sanlove
Forum Newbie
Posts: 3
Joined: Sun Jan 26, 2014 1:29 am

Re: php ablum with thumbnail

Post by sanlove »

this is the query i used to fetch data(actual table)

SELECT s.*, pa.name, u.uniqueId
FROM (services s
INNER JOIN user u ON (s.int_uid = u.userId))
INNER JOIN photo_album pa ON (s.int_id = pa.sid)
WHERE ( ( ( (s.lat > 8.498946165695486 AND s.lat < 8.51380130326614)
AND s.lng > 76.95714611355584)
AND s.lng < 77.01830047909539)
AND s.int_deleted = '0')
ORDER BY s.int_id DESC
LIMIT 25

and the output is
Image
i need code for int_id 147 one time and 2 images,
int_id 140 one time and 3 images,
int_id 139 one time and 2 images.
Post Reply