Redian新闻
>
a simple question about insert
avatar
a simple question about insert# Database - 数据库
s*r
1
mysql_select_db(INQUIRY_DB);
$insert = "INSERT INTO profiles
set INQEmail=\"$lname\"";
$result = mysql_query($insert);
I use mysql in php code. but whenever I tried to add a new entry into the
table, I always failed. can somebody give me some suggestion why that happen?
this is a test. the table include a lot of columns, I tried to add a new entry
with only one column value. thanks very much!
avatar
c*y
2
ft, it's either
insert into table(col) values(value)
or update table set col = value
ur sql is wrong

【在 s*****r 的大作中提到】
: mysql_select_db(INQUIRY_DB);
: $insert = "INSERT INTO profiles
: set INQEmail=\"$lname\"";
: $result = mysql_query($insert);
: I use mysql in php code. but whenever I tried to add a new entry into the
: table, I always failed. can somebody give me some suggestion why that happen?
: this is a test. the table include a lot of columns, I tried to add a new entry
: with only one column value. thanks very much!

avatar
s*r
3
$insert = "INSERT INTO profiles
(INQLast_Name,INQEmail) values ('$lname,$lname')";
failed, is that the correct syntax when adding more column values? thanks.
if I add a single value, it works good, but when I tried to add mutiple, it
failed. thanks.
the
avatar
aw
4
FT,你INSERT到2个COLUMN,INQLast_Name,INQEmail,怎么用一个值'$lname,$lname'?(
应该是‘$lname’,‘$lname')

new

【在 s*****r 的大作中提到】
: $insert = "INSERT INTO profiles
: (INQLast_Name,INQEmail) values ('$lname,$lname')";
: failed, is that the correct syntax when adding more column values? thanks.
: if I add a single value, it works good, but when I tried to add mutiple, it
: failed. thanks.
: the

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。