Jump to content


Photo

Simple mysql question


  • Please log in to reply
5 replies to this topic

#1 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 12 July 2006 - 08:44 AM

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?

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#2 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 12 July 2006 - 08:46 AM

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.....

#3 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 12 July 2006 - 08:48 AM

lol.. thanks.

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#4 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 12 July 2006 - 08:52 AM

is that of help then?

i mean like u can have SELECT * FROM messages WHERE messages_status='NEW'


#5 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 12 July 2006 - 09:15 AM

Yes that was alot easier then what I was wanting to do. I always try to over complicate things.


Thanks

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#6 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 12 July 2006 - 09:19 AM

good, good, glad to be of help.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users