Why did this properly escalate the SQL query?

Here's the request:

INSERT INTO jobemails (jobid, to, subject, message, headers, datesent) VALUES ('340', ' jrhodes@jhu.edu ', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06') 

All data types are correct, it always fails in the question, so I suppose I should avoid the values.

I am sure that one of you will immediately see my idiotic mistake. Help a little?

+4
source share
1 answer

SQL confuses 'to' from a string to a function.

Try:

 INSERT INTO `jobemails` (`jobid`, `to`, `subject`, `message`, `headers`, `datesent`) VALUES ('340', ' jrhodes@jhu.edu ', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06') 
+8
source

Source: https://habr.com/ru/post/1307726/


All Articles