PHP MySQL syntax
Posted on 2008-06-24
I have a table with the following columns:
I don't know how to explain what I am trying to do, so I will provide an example.
ID - 200
Content - "this is some content . the content is usually long"
post_parent - 0
If the above record has an image associated to the content field, another record in the same table is written
id - 250 ( i don't think i need this)
content - null
post_title - filename.jpg (this is the file I need to grab)
post_parent - 200 - same as ID in first record.
I want to query the table and display the records, but if there is an associated record with an image , I need to display that image with the record.
Can anyone help me out with this?