Passing parameter to mysql query
Posted: Tue Feb 26, 2008 8:02 am
Scottayy| Please use when posting code in the forums.[/color]
Please help:
How can i pass the parameter below to an sql query?
Whenever i query, i get 0 records. Where am i going wrong?
Code: Select all
andPlease help:
How can i pass the parameter below to an sql query?
Code: Select all
$searchItem = $_REQUEST['searchItem'];
$sql = "SELECT committee_name, decision.decision_id, decision_date,
indicator_name, indicator_status, indicator_remark
FROM committee, decision, indicator
WHERE decision.committee_id = committee.committee_id
AND decision.decision_id = indicator.decision_id
AND decision.committee_id = indicator.committee_id
AND decision_name LIKE '%$searchItem%'
ORDER BY decision.committee_id ";