values are not inserting
<?php
$ll=mysql_query("CREATE TABLE IF NOT EXISTS $p (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`colum` varchar(255) NOT NULL DEFAULT '',
`ord` varchar(255) NOT NULL DEFAULT '',
`tex` varchar(255) NOT NULL DEFAULT '',
`search` varchar(255) NOT NULL DEFAULT '',
`count` varchar(255) NOT NULL DEFAULT '',
`order` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
)ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;INSERT INTO $p
VALUES ('$a','$b','$c','$d','$f','$h','$g');") or die(mysql_error()) ;
if($ll){
echo "insert AND CREATE ";}
else {echo "fail"; }
?>
I am working in a php language . In this page if the table is not created
1st create it and then insert the values into the column
After creating the table , I am inserting the values into the table but it
showing me the error in the insert query
I am getting a this error- You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near 'INSERT INTO p VALUES
('count','name','asc','1','search','count','order ')' at line 11
what am i doing wrong
No comments:
Post a Comment