Simple Question

Currently I have three tables: tblUsers, tblReport, tblContent.

What I want to happen is that each user can make reports, each user can also update the content of any report, the thing is I want to store each update to the content hence having tblContent.

The problem I am having is that I want to be able to output a list of each entry with the most recent update of content, somewhat like having a forum where next to each topic the latest reply is shown.

I hope I am making myself clear here but any help would be much appreciated, there may be a much much better way to go about this than I am but then if I knew it I wouldn’t be asking for help.


Now in case this is needed (which I imagine it might be) here is some more precise information on the tables I am using:


reporterID (who added the report)
reportTitle (name of report)
reportTime (when it was added)

entryID (which report it belongs too)
updaterID (who updated the content)
content (the content)
updateTime (when it was updated)

The final list I would like to generate would look something like so:


Thanks again.

I’m thinking you’re gonna have to use INNER JOINs in your query for this. Either that, or use multiple queries.

Sponsor our Newsletter | Privacy Policy | Terms of Service