I am struggling to perform the following mysql multiple insert using pdo.
Here is the php code:
Code: Select all
$sql="INSERT INTO milp(`<!--#echo var="auth_type" -->` , `<!--#echo var="content_length" -->`) VALUES
((none1,none2) , (none3,none4)) "
$dbh->exec($sql);
$dbh=null;
[text]
INSERT INTO milp(`<!--#echo var="auth_type" -->` , `<!--#echo var="content_length" -->`) VALUES ((none1,none2) , (none3,none4)).
[/text]
when I test the above sql string with phpmyadmin I get the following output:
using showtable create , I get ( in part ):
#1054 - Unknown column '<!--#echo var="auth_type" -->' in 'field list'
INSERT INTO milp( `<!--#echo var="auth_type" -->` , `<!--#echo var="content_length" -->` )
VALUES (
none1, none2
), (
none3, none4
)
`milp` (
` 1` char(40) DEFAULT NULL,
` <!--#echo var="auth_type" -->` char(40) DEFAULT NULL,
` <!--#echo var="content_length" -->` char(40) DEFAULT NULL,
Can anyone explain this?
Thank you,
KC