Hello all! I have a method which insert a record into a table as shown below:
public static function AddCategory($categoryName)
{
$sql = 'INSERT INTO category(name)
VALUES(' . $category_name .')';
$parameters = array('category_name' => $categoryName);
return DB::Execute($sql,$parameters);
}
Can anyone tell me if the SQL syntax is correct? Im not being able to insert any record..I can't find my mistake. Thanks