php include ("conn.php"); $sql="insert into re (username, password, enterprise, website, address, zip, email, phone, dt) values ('$_POST['TU']','$_POST['TP']','$_POST['TN']','$_POST['TW']','$_POST['TA']','$_POST['TZ']','$_POST['TE']','$_POST['TH']',now())"; $result=mysql_query($sql,$conn); mysql_close($result); ?> ======================================...
by akyahoo - PHP - 2009-09-11 08:32:11 阅读(2116) 回复(8)
我的代码:
$conn = new COM("ADODB.Connection") or die ("Cannot start ADO");
$dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" . realpath ("wtgq.mdb");
$conn->;Open ($dsn);
if ($_POST['add']) {
$dept = $_POST['dept'];
$pass = $_POST['pass'];
//echo $dept . $pass . "
;";
$sql = "insert into plants (deptname, password) values (\"{$dept}\", \"{$pass}\")";
e...
我在使用mysql-5.0.18 insert into时,出现提示 ERROR 1064 (42000) at line 25: 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 '('[email]miao@maio.com[/email]','$1$c90bxsVWCp$4bvbxPjTK6Or/xK0ibFdgo.','[email]miao@miao.com[/email]','miao.com'' at line 3 不知如何解决,请教各位。 原文:insert into text (username,pass...
是这样的,目前有个想法,我建了个表 time data customer num 有以上四列,但利用公司某系统导出的txt只有2列数据,比如 time data这2列, 能否实现在插入mysql的过程中自动补全表的后2列?且都为想通值,既最后结果是 time data customer num 11 12 aaa 001 13 122 aaa 001 不知道这样能不能实现呢
表结构 id int(11) not null pri key auto_increment,name varchar(12),backup varchar(50) 现在想插入一条记录的同时,返回他的id值(插入时只是插入name和backup字段的值)。请问该如何写这条语句。谢谢!
我想批量执行一批数据 insert into table A(column1,column2,...)values(‘x’,‘y’,...) 其中y所在列我想从另一表B中选取一列z(比如五个值) 使用子句 (select z from table B) 整个语句就是 insert into table A (column1,column2,...) values('x',(select z from table B),...) 返回结果告诉我:single rowsubquery return more than one row 我也感觉语句不对,所以只选取一小批数据,数据有很多条,各个列都定...
要从A表中selcet出两列多行,插入到B表中的某两列中,怎么做呢? insert into B_table (item,value,pkg) values(SELECT attribute FROM A_table where neitemid='2763' order by id,SELECT value FROM A_table where neitemid='2763' order by id.800) 这里的pkg是个常数 谢谢