[thelist] [PHP] Converting a mulitdimentional array to a valid

r937 rudy at r937.com
Fri May 9 07:47:05 CDT 2008


> Each image is asigned to a project in the 'work' table..

i guessed that this was parentId


SELECT work.posterImage as poster_pic
     , work.title
     , FROM_UNIXTIME(work.date, '%d.%m.%y') as date
     , work.blurb
     , clients.img as client_logo
     , work.media
     , images.id
     , images.imgType
     , images.etc
  FROM work
INNER
  JOIN clients 
    ON clients.id = work.clientId
INNER
  JOIN images
    ON images.parentId = work.id
 WHERE work.id = 1




More information about the thelist mailing list