Quote:
Originally Posted by Dismounted
[sql]SELECT *
FROM post AS p
LEFT JOIN user USING (userid)
LEFT JOIN userfield USING (userid)
WHERE p.postid = X[/sql]
That will fetch one specific post and associated user data. Note that the post will not have been parsed for BB code. If you have the knowledge/time, you may want to investigate fetching the cached post if available.
|
Okay. So lets say I put this in my SQL:
Code:
SELECT *
FROM post AS p
LEFT JOIN user USING (userid)
LEFT JOIN userfield USING (userid)
WHERE p.postid = 12066
Then what's the code I have to use to make it appear on the page?