Jump to content

newbie question


nec9716

Recommended Posts

Example

 

users:

id

username

password

email

firstname

lastname

 

messages:

id

senderid

receiverid

subject

body

postdate

read

 

SELECT * FROM messages JOIN users ON messages.senderid=users.id WHERE username='$un'

 

That would maybe show you all the messages in an inbox for the person with username $un and you would have access to their firstname and lastname and email since you associated the senderid with the userid.

 

That's the basic concept.

Link to comment
https://forums.phpfreaks.com/topic/97105-newbie-question/#findComment-496881
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.