hey.
i use these SQL command
PHP Code:
$a = $db->query_first("SELECT `IDs` FROM " . TABLE_PREFIX . "second WHERE pID = $pID");
$b = $a['IDs']; // it returns like 7,9,15,16
$query = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "first WHERE ID IN ($b)");
its working perfectly.
but i want to use a single query instead of two
i tried this:
PHP Code:
$query = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "first AS first
LEFT JOIN " . TABLE_PREFIX . "second AS second
WHERE first.ID IN (second.IDs) AND second.pID = $pID");
not working.showing error
plz help me