I am using prepared statements to preform an update. But for some reason a string that contains an apostrophe does not get updated. Is there a way where I can update a string ans preserve the apostrophe??
Below is an example of my query
$query = "UPDATE items SET item_name = ? , item_price = ? WHERE id = ? ";
$stmt = $db->prepare($query);
foreach($items_and_prices as $id => $item_and_price){
$item = $item_and_price[0];
$price = $item_and_price[1];
$stmt->bind_param("sdi",$item, $price,$id);
$stmt->execute();
}