I'm fairly sure this should go under newbies but it concerns a PHP / MYSQL form I'm trying to run as a query mechanism.
$qid = db_query("SELECT ipo_programs.cost.program_fee
FROM ipo_programs.cost
WHERE year = '$year'
AND term = '$term'
AND id_program = '$prog'");
if (!$qid) {
echo("<p>Error performing query: " . mysql_error() . "</p>");
exit();
}
while ( $row = mysql_fetch_array($qid) ) {
echo("<p>" . $row["program_fee"] . "</p>");
}
Now that by itself works, it pulls the #'s from the row.
but if I want to pull multiple columns...then it doesnt work. Example....
$qid = db_query("SELECT ipo_programs.cost.program_fee,
ipo_programs.cost.program_fee_desc,
ipo_programs.cost.program_fee_includes
FROM ipo_programs.cost
WHERE year = '$year'
AND term = '$term'
AND id_program = '$prog'");
What my main goal is to pull multiple columns based on what "year" , "term" and "prog" are when the person enters out the form...so if in the form, the person enters Fall , 2002, University of Joe , I want all "program_fee" , "fee_include" and "fee_desc" to show on the following page?
I dont think this is tough but having some problems obviously.
Thanks in advance.