Joinng 2 MySQL tables
Not sure if I'm doing this correctly...
The two tables are Suppliers (houses all suppliers) and delMenu (houses delivery postal codes, fees, etc).
I need to join two tables (suppID is the common filed in both).
I have a recordset (rsDelMenu) that lists all records in delMenu that match two variables posted from the form on the previous page. I now need to merge the results of this recordset with all records in the Suppliers table, where suppID = suppID
=== rsDelMenu ===
$colname_rsDelMenu = "-1";
if (isset($_POST['serviceType'])) {
$colname_rsDelMenu = $_POST['serviceType'];
}
$colPC_rsDelMenu = "-1";
if (isset($_POST['Postal_Code'])) {
$colPC_rsDelMenu = $_POST['Postal_Code'];
}
mysql_select_db($database_connData, $connData);
$query_rsDelMenu = sprintf("SELECT * FROM delMenu WHERE serviceTypeID = %s AND delPC = %s", GetSQLValueString($colname_rsDelMenu, "int"),GetSQLValueString($colPC_rsDelMenu, "int"));
$rsDelMenu = mysql_query($query_rsDelMenu, $connData) or die(mysql_error());
$row_rsDelMenu = mysql_fetch_assoc($rsDelMenu);
$totalRows_rsDelMenu = mysql_num_rows($rsDelMenu);