Welcome Guest, Not a member yet? Register   Sign In
need help, relation, i dont know what is it !
#1

[eluser]amrnt[/eluser]
i have 2 tables users, comments

Code:
users :
id
name:varchar

comments :
id
from:int
to:int
body:text

now, when a user post a comment on other user page
a new row add to comments, from:who posts id, to:user's page id .so

currently i'm displaying the comment like this :
Code:
- 1 wrote on 2 'help me'.

if we said that there are 2 rows in users table and a row in comments

Code:
USERS :
id : name
----------------
1 : John
2: Amy

//and

COMMENTS :
id : to : from : body
---------------------------------
1 : 2 :1 : "help me"

I want the result like this

Code:
- John wrote on Amy 'help me'.

,,,,,........... any help ?
thanks in advance !
#2

[eluser]Pascal Kriete[/eluser]
Amrtami, please limit yourself to one thread per topic, and bump that one if (and only if) it slips off the front page without a resolution. That way all related information is in one place. It makes it easier on you, and easier on the people trying to help you.

I'll answer your question in the original thread.
#3

[eluser]amrnt[/eluser]
oh sorry, hoping to find a solution i tried another thread!
hope to help me !




Theme © iAndrew 2016 - Forum software by © MyBB