由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - a simple question about insert
相关主题
How to handle inserting value to Identity column in sql server 2005再问大虾:对那些违反contraint的数据是如何处理的?
How to split a column into several rows?How to replace 0 with empty?
Help on Sql server huge table performanceHow to get other columns after UNION?
database triggersIn MySQL, 如何在procedure里create trigger?谢谢了?
MySQL怎么远程地set Text或Blob column?SQL Server Trigger on System Base Table or Catalog View
mysql maximum columns <=1000?SQL add some columns into a table from another table (转载
请教一个mysql 排序问题。want to import CSV file to mysql, so I have to create a table first?
mysql query questionTable Merge (SQL Server)
相关话题的讨论汇总
话题: insert话题: lname话题: mysql话题: inqemail话题: add
进入Database版参与讨论
1 (共1页)
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

1 (共1页)
进入Database版参与讨论
相关主题
Table Merge (SQL Server)MySQL怎么远程地set Text或Blob column?
其实有个问题好久没有明白!mysql maximum columns <=1000?
Oracle Group and Index question请教一个mysql 排序问题。
better way to compare nullable columns?mysql query question
How to handle inserting value to Identity column in sql server 2005再问大虾:对那些违反contraint的数据是如何处理的?
How to split a column into several rows?How to replace 0 with empty?
Help on Sql server huge table performanceHow to get other columns after UNION?
database triggersIn MySQL, 如何在procedure里create trigger?谢谢了?
相关话题的讨论汇总
话题: insert话题: lname话题: mysql话题: inqemail话题: add