Another update that deals with these things more cleanly. I'm working on an addition that'll allow the "go advance" in the QR to also have all the quotes.
Change the newreply.php code to the following:
PHP Code:
//############################################################################
//# START MULTI QUOTE #
//############################################################################
if(isset($_COOKIE[COOKIE_PREFIX . 'mq']))
{
$pids = $_COOKIE[COOKIE_PREFIX . 'mq'];
$pids = urldecode($pids);
if(!empty($pids) && preg_match("/^[0-9,]+$/", $pids))
{
$mq_postid = (empty($_REQUEST['noquote']) ? "AND postid <> {$postinfo['postid']}" : '');
$q = $DB_site->query("SELECT postid, username, pagetext FROM ".TABLE_PREFIX."post WHERE postid IN($pids) $mq_postid ORDER BY postid ASC LIMIT 20");
while($row = $DB_site->fetch_array($q))
{
$originalposter = fetch_quote_username($row['username']);
$pagetext = htmlspecialchars_uni($row['pagetext']);
$pagetext = trim(strip_quotes($pagetext));
eval('$newpost[\'message\'] .= "' . fetch_template('newpost_quote', 1, 0) . '\n";');
}
}
setcookie(COOKIE_PREFIX . 'mq', '', time() - 3600, $vboptions['cookiepath'], $vboptions['cookiedomain']);
}
//############################################################################
//# END MULTI QUOTE #
//############################################################################
This should fix all mysql errors recieved above, on my test board it seemed to do fine

It also now checks that the $pids is only numbers/commas so there are no tricky users trying to screw up the board.
[Updated file uploaded in first post]