tomfmason Posted July 12, 2006 Share Posted July 12, 2006 I am writing, for a friend, a message script that uses a database instead of sending the message via email. Now when he logs in I want him to be able to see any new messages. I plan on having a new_message field in the admin table that would be the message_id from the from the message table. I know this is simple and I should already now how to do this but I don't....lol. My question is how would I post to the message_id to the new_message field when the message is sent? Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/ Share on other sites More sharing options...
brown2005 Posted July 12, 2006 Share Posted July 12, 2006 why dont you have a field in the original messages like message status and when someone posts a new message the status will be new, and then if they read it, read, etc, etc..... Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/#findComment-56652 Share on other sites More sharing options...
tomfmason Posted July 12, 2006 Author Share Posted July 12, 2006 lol.. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/#findComment-56653 Share on other sites More sharing options...
brown2005 Posted July 12, 2006 Share Posted July 12, 2006 is that of help then?i mean like u can have SELECT * FROM messages WHERE messages_status='NEW' Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/#findComment-56654 Share on other sites More sharing options...
tomfmason Posted July 12, 2006 Author Share Posted July 12, 2006 Yes that was alot easier then what I was wanting to do. I always try to over complicate things.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/#findComment-56659 Share on other sites More sharing options...
brown2005 Posted July 12, 2006 Share Posted July 12, 2006 good, good, glad to be of help. Quote Link to comment https://forums.phpfreaks.com/topic/14364-simple-mysql-question/#findComment-56660 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.