I'm having trouble with a query in php as follows, Example:
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal','Tom B. Erichsen','Skagen 21','Stavanger','4006','Norway');
This query works normally, but when I need to use some word that has' in the middle it causes a query problem.
Example:
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal','Tom B. Erichsen','Skagen 21','Stavanger','4006','D'Agua');
This query already happens an error because of the word D'Agua. What is the simplest way to solve this? Note: The query is being executed in PHP.