Forum Moderators: coopster
im doing a search query, whereby it'll have to satisfy a few conditions. as it's very straightforward it'll need to pass conditions from 4 fields before returning the result. i've made use of a temporary table. thing is, i could return it using one condition, but it gives a msg saying query unbuffered when i tried with all 4.
$result = mysql_query("SELECT * FROM PEAR_reports WHERE trainer='$trainer1' AND program_title='$program_title1' AND start_date='$start_date1' AND end_date='$end_date1'");
anything wrong or funny with that line?
Do this to show your query and help you to debug it:
$sql = "SELECT * FROM PEAR_reports WHERE trainer='$trainer1' AND program_title='$program_title1' AND start_date='$start_date1' AND end_date='$end_date1'";
echo $sql;
$result = mysql_query($sql);
I agree with tomda, all looks fine. The *unbuffered* error is a bit different though, sounds like it may be a configuration issue. You could also incorporate mysql_error() [php.net] to further troubleshoot your issue (also see the mysql_errno() and other relative troubleshooting links on this page).