Jump to content

Recommended Posts

I'll start you off with query needed. I am a bit confused by user 10 appearing twice in the output so I am assuming you want the output order by service

SELECT u.int_uid
    , u.str_uname
    , s.str_sname
    , p.str_imagename
FROM tbl_user u
    INNER JOIN tbl_service s USING (int_uid)
    INNER JOIN tbl_photos p USING (int_sid)
ORDER BY s.str_sname

thanks . 

my problem is not with the query.

 

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 willbe

 

 

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.

Edited by sanlove
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.