I have to perform a SELECT operation in the DB. Since I want to narrow down the search results, I was wondering if I should use nested SELECTs or use a JOIN operation?
I want to perform a dual search on the table. I unsuccessfully tried this:
$receive_listings = mysql_query('SELECT *
from show_detail
WHERE ch_id="0140.zee.in" IN ('SELECT *
FROM show_detail
WHERE `date_column` BETWEEN `2010-08-17` AND `2010-08-18`')'
) or die("ERROR: $receive_by_show_id.".mysql_error());
throws an error:
Parse error: syntax error, unexpected T_VARIABLE in /Applications/XAMPP/xamppfiles/htdocs/play/browse-channels-shows.php on line 17
I was wondering if a JOIN operation would do the trick more efficiently?