I have a variable $categoryName
which has value ABC/ABC (for example). I nedd to add quotes around this text "ABC/ABC". This is my PHP code:
public function getCategoryID($categoryName)
{
$row = Db::getInstance()->getRow('
SELECT `id_category`
FROM ' . _DB_PREFIX_ . 'category_lang c
WHERE c.`name` = ' . $categoryName);
return isset($row['categoryName']);
}
And the error from mysql.
SELECT `id_category`
FROM ps_category_lang c
WHERE c.`name` = ABC/ABC LIMIT 1
How to solve this problem ? Thanks for help.