This was bugging me for a while. I'm trying to make my own message board because I can't find one I like and I thought it would be good practice.
I have two tables, posts and users:
users
id | username | password | email | homepage
posts
id | user | subject | title | firstmessage | bid | date | editdate | views | sticky
Then I use this to get a list of all the posts where the boardid = 1, it's the first message, and it isn't sticky:
select subject, posts.id, users.id, user, username, views, date from posts, users where users.id = 'user' and firstmessage='yes' and sticky = 'N' and bid = '1' order by editdate desc
But it doesn't return anything. I'm trying to get the posts id, subject, date posted, and the username and id. The user column in the posts table refers to the users table id's.
Anyone see why it wont work?
Thanks,
Justin Sampson
Last edited by Justin Sampson; Mar 25, 2001 at 08:36.
Bookmarks