Jump to content

MySQL JOIN


richiejones24

Recommended Posts

I am trying to join these 2 tables below, but its not working, any ideas where i am going wrong??

<?php
require("../include/mysqldb.php");
$con = mysql_connect("$dbhost","$dbuser","$dbpass");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("$dbame", $con);



$result = "SELECT *
Reg_Profile_public.pref, Search_profiles_up.search_small_image
FROM
Search_profiles_up
INNER JOIN
Reg_Profile_public_Sex
ON
Search_profiles_up.UIN=Reg_Profile_public.UIN
WHERE
UIN='803272125132009'";

while ($row = mysql_fetch_array($result)) {
    echo $row['search_small_image'];
    echo $row['pref'];
}



?>

Link to comment
https://forums.phpfreaks.com/topic/251453-mysql-join/
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.