Example #1
0
 public static function delete_recipes(array $recipe_ids)
 {
     //Smart quote each recipe id
     $recipe_ids = array_map(function ($element) {
         return MySQLConnection::smart_quote($element);
     }, $recipe_ids);
     $SQL = "DELETE FROM recipes\n\t\t\t              WHERE `id` IN (" . implode(',', $recipe_ids) . ")";
     MySQLConnection::query($SQL) or Error::db_halt(500, 'internal server error', 'Unable to execute request, SQL query error.', __FUNCTION__, MySQLConnection::error(), $SQL);
 }