Hmm. Looks easy. Here is the results of my first try. My DB has portal blocks with BIDs from 16 to 23. All are disabled.
So I put the following into a static page and tried the page with both "Execute PHP" and "Execute PHP(return)" options selected in the static page editor.
Text Formatted Code
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (17,18)");
while ($row = DB_fetchArray($res)) {
$display .= COM_formatBlock($row);
}
return /*or echo*/ $display;
I got the following,
An SQL error has occurred. Please see error.log for details.
Here is the error log entry
Text Formatted Code
Mon 26 Nov 2007 08:16:30 EST - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE bid in (17,18)' at line 1. SQL in question: SELECT * from WHERE bid in (17,18)