提前感谢您回答这个问题,这是我的代码的一部分,它不起作用。
$sql_insert = "INSERT INTO 'users'
(
`ragionesociale`,
`user_name`,
`user_email`,
`pwd`,
`nome`,
`cognome`,
`tel`,
`tel2`,
`website`,
`date`,
`users_ip`,
`activation_code`,
`piva`,
`cf`,
`azienda`)
VALUES
(
'$data[ragionesociale]',
'$data[user_name]',
'$user_email',
'$sha1pass',
'$data[nome]',
'$data[cognome]',
'$data[tel]',
'$data[tel2]',
'$data[website]' ,
now(),
'$user_ip',
'$activ_code',
$data[piva],$data[cf],
$data[azienda])";mysql_query($sql_insert) or die("Insertion Failed:<br>$sql_insert<br>" . mysql_error());
这是给定的结果:
INSERT INTO 'users' (
`ragionesociale`,
`user_name`,
`user_email`,
`pwd`,
`nome`,
`cognome`,
`tel`,
`tel2`,
`website`,
`date`,
`users_ip`,
`activation_code`,
`piva`,
`cf`,
`azienda`
)
VALUES (
'La Fabbrica dei Giochi',
'uuuuuuu',
'sssss@gmail.com',
'e258c8aac30eba143e1f3sssss6dc1cdc4d58ff1095',
'pietro',
'rossi',
'234234234',
'345.4346865',
'www.ssss.it' ,
now(),
'212.124.171.131',
'9962',
2323232,
tsssss6i819s,
1 )
错误信息:
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 ''users'
(`ragionesociale`, `user_name`, `user_email`, `pwd`, `nome`, `cogno' at line 1
我找不到这段代码有什么问题,我浪费了 2 个小时......