PDA

View Full Version : Edited by which field in database ?


roxxx
07-19-2007, 02:38 PM
'Edited by',
which field is in database with user name who post edited ?

nico_swd
07-19-2007, 03:23 PM
It's in the table called "editlog", the username field.

roxxx
07-20-2007, 07:25 AM
$getposts=$db->query_read("
SELECT
post.*,
editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline
FROM
". TABLE_PREFIX ."thread AS thread,
". TABLE_PREFIX ."post AS post,
". TABLE_PREFIX ."editlog AS editlog
JOIN editlog ON post.postid = editlog.userid
WHERE thread.forumid = 5 AND
post.postid = thread.firstpostid AND
post.visible = 1
GROUP BY
post.postid DESC
LIMIT
10");

above query is correct,
but when I add to this JOIN isn't correct :(
I'd like display who edited post but is problem with query.