由买买提看人间百态

topics

全部话题 - 话题: inqemail
(共0页)
s*****r
发帖数: 59
1
来自主题: BuildingWeb版 - a question about php and mysql
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!
P****y
发帖数: 707
2
来自主题: BuildingWeb版 - a question about php and mysql
mysql_select_db("INQUIRY_DB");
$insert = "INSERT INTO profiles (INQEmail) VALUES ('$lname')";
s*****r
发帖数: 59
3
来自主题: BuildingWeb版 - a question about php and mysql
$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.

happen?
entry
c******e
发帖数: 1581
4
来自主题: BuildingWeb版 - a question about php and mysql
slipper, you need a little more bit study on php and mysql.
The correct syntax should be:
$insert = "INSERT INTO profiles (INQLast_Name, INQEmail) values
('".addslashes($lname)."','".addslashes($lname)"')";
Note single quote is around each varchar field.

the
s*****r
发帖数: 59
5
来自主题: Database版 - a simple question about insert
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
6
来自主题: Database版 - a simple question about insert
$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
7
来自主题: Database版 - a simple question about insert
FT,你INSERT到2个COLUMN,INQLast_Name,INQEmail,怎么用一个值'$lname,$lname'?(
应该是‘$lname’,‘$lname')

new
(共0页)