SELECT KeyID FROM Page WHERE (Alias LIKE ''+v.alias+'/' OR KeyID = ''+v.alias+'/') AND Visible=1 AND LanguageID = 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '+v.alias+'/' OR KeyID = ''+v.alias+'/') AND Visible=1 AND LanguageID = 1' at line 1