Open Wolfsblvt opened 9 years ago
Try using single quotes around SQL strings.
$sql = 'SELECT bbcode_id
FROM ' . BBCODES_TABLE . "
WHERE bbcode_tag = 'mention' OR bbcode_tag = 'mention='";
Thank you for that tip. Single quotation marks seems to be working for MSSQL. Let's hope it is working in all other dbms systems as well. Thank you, @bantu.
May be better to consider using sql_in_set instead.
'WHERE ' . $this->db->sql_in_set('bbcode_tag', array('mention', 'mention='));
Even better, agreed.
Mentioned here: https://www.phpbb.com/community/viewtopic.php?p=14003031#p14003031
The query where the error occured is here: https://github.com/Wolfsblvt/mentions/blob/master/ext.php#L91-L93