In plain english I want the query both job and address according to the "j_id" but also pull the correct company info according to "a_id".
I know the current query is missing some of this, I'm not sure how to construct it.
Any help would be greatly appreciated.
-Pete
Code: Select all
<?php
include 'includes/connect.php';
$j_id = $_GET['j_id'];
$query = "SELECT * FROM job, address WHERE j_id='$j_id'";
$result = mysql_query($query) or die('Error : ' . mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$status = $row['status'];
$type = $row['type'];
$jobname = $row['jobname'];
$jdescription = $row['jdescription'];
$jobid = $row['jobid'];
$date = $row['entry_date'];
$jobid = $j_id . $jobid;
?>