Flatten an array of query comments into a single comment string.
The comment string will be sanitized to avoid SQL injection attacks.
$comments: An array of query comment strings.
A sanitized comment string.
public function makeComment($comments) {
if (empty($comments)) {
return '';
}
// Flatten the array of comments.
$comment = implode('; ', $comments);
// Sanitize the comment string so as to avoid SQL injection attacks.
return '/* ' . $this
->filterComment($comment) . ' */ ';
}