s*****r 发帖数: 59 | 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! | c***y 发帖数: 114 | 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!
| s*****r 发帖数: 59 | 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 | aw 发帖数: 127 | 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
|
|