MyBB Community Forums

Full Version: Can I change showthread code like this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in showthread.php

$query = $db->query("
SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)

to


$query = $db->query("
SELECT u.*, p.username AS userusername, p.*, f.*, eu.username AS editusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)


u.username -> p.username

I want my old username to be displayed in old posts.
I think its fine.