Hello friends,
Well i have two table one is used for user information while registeration and another table is only used for users profile image. In member list page i want to show users name , location and profile image. I m able to show a name and location but not able to show a image from another table .

So plz help me how to join a two table in my sql

Table 1 - Users $name=$row and $city=$row
Table 2 - images $pic=$row

Something like this, if the image in table2 is optional.

SELECT * FROM table1
  LEFT JOIN table2 ON table.userid = table2.userid
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.