macromedia.dreamweaver.appdev
[Top] [All Lists]

Re: PHP/MySQL form Query

Subject: Re: PHP/MySQL form Query
From: "Ken Ford - *ACE*"
Date: Mon, 6 Oct 2008 10:06:23 -0500
Newsgroups: macromedia.dreamweaver.appdev


All of these would have to be true to display any results:

WHERE job_status = 'ON'
AND rest_city = '$_REQUEST[city]'
AND job_category = '$_REQUEST[position]'
AND job_wages = '$_REQUEST[wage]'
AND job_accom = '$_REQUEST[accom]'
AND job_travel = '$_REQUEST[travel]'
AND job_drvlicense = '$_REQUEST[drvlic]'
AND rest_licenced = '$_REQUEST[bar]'"

--
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS3
Adobe Certified Expert - ColdFusion 8
Fordwebs, LLC
http://www.fordwebs.com


"The_FedEx_Guy" <webforumsuser@xxxxxxxxxxxxxx> wrote in message news:gccu9d$nnm$1@xxxxxxxxxxxxxxxxxxxxxxxx
I am trying to get two tables joined so I can take data from both tables and
view them, search them from a form.

I have this as my query:
mysql_select_db($database_db, $db);
$query_job_results = "SELECT * FROM jobs, restaurants WHERE job_status = 'ON' AND rest_city = '$_REQUEST[city]' AND job_category = '$_REQUEST[position]' AND job_wages = '$_REQUEST[wage]' AND job_accom = '$_REQUEST[accom]' AND job_travel
= '$_REQUEST[travel]' AND job_drvlicense = '$_REQUEST[drvlic]' AND
rest_licenced = '$_REQUEST[bar]'";
$job_results = mysql_query($query_job_results, $db) or die(mysql_error());
$row_job_results = mysql_fetch_assoc($job_results);
$totalRows_job_results = mysql_num_rows($job_results);

Displays nothing apart from the blank page, have I missed something out?

I havent done table joins for over 4 years now :'(




<Prev in Thread] Current Thread [Next in Thread>