how to get rid of '\' from the database?
I have inserted many words which have an apostrophe such as John's, Peter's...by putting \ with it. How do I get rid of that?
I have:
<?php
require_once('cat/mysql.php');
$sql = "UPDATE bible SET text_data = REPLACE(text_data, '\', '')";
//$sql = "UPDATE bible SET text_data = '36' WHERE FirstName = 'Peter' AND LastName = 'Griffin'";
mysql_query($sql);
//mysql_close($con);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
$sql2 = "SELECT text_data FROM bible WHERE text_data LIKE '\'";
$result = mysql_query($sql2);
while($row = $result)
{
echo $row['text_data'];
echo "<br />";
}
mysql_close($con);
?>
</body>
</html>
Please login to leave a reply, or register at first.