I am trying to add a couple of rows to my sqlite database to ‘initialize’ it. I need to add a column with single quotes and a carriage return. The CR needs to be before the first single quote. The code below enters the data on one line and has double quotes.
$commonName = sqlite_escape_string("Blanket Flower 'Fanfare'");
try{
$query = "INSERT INTO plant(id,
common_Name,
latin_Name)
VALUES (1,:commonname,'Gaillardia')";
$statement = $db->prepare($query);
$statement->bindParam(':commonname', $commonName);
$statement->execute();
I appreciate your time,
Todd
Since you are using
bindParam, there is no need to usesqlite_escape_string.