I have two tables with user information. in the first table there is the user's adress - every user has got one entry there. the second table is the user's posts. each user can have 0, one or more than one. the tables are linked with the key: user_ID
now I want to build a search function, that searches as well in the users details as in the posts. I have:
$search="SELECT * FROM user, posts WHERE user.username='$username' AND posts.memo='$memo' AND user.user_ID=posts.user_ID"
while ($row=mysql_fetch_array ($search){
echo $row["username"];
echo $row["memo"];
}
it almost works....but users that have posted more than one thing are then displayed double or tripple.
subquery is not possible, as I use myql 3.2.3.xx
any idea, how I can do this?