php进行sql server操作报错
php对sql server 2000进行操作
sql语句是:
insert into someTable values('1111111','222222','33333333333','1100100',4,'5100005','盘尼西林','01','0.125g*20','口服常释剂型',16,1,16,0,0,'0','1','2012-05-07','YP','11','盒',16,0,0,0,'01','01',16,0,0,'ZL001','2012-5-7','/','/','/')
在sql sever2000的sql查询分析器执行没问题,但在php中执行报错,代码如下:
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <?php mssql_connect("someIP","id","pass"); if($con) echo "link db success!"; else echo "link db failed!". mysql_error(); $db = mssql_select_db( "someDatabase",$con) or die("无法选择db"); $query = "insert into someTable values('1111111','222222','33333333333','1100100',4,'5100005','盘尼西林','01','0.125g*20','口服常释剂型',16,1,16,0,0,'0','1','2012-05-07','YP','11','盒',16,0,0,0,'01','01',16,0,0,'ZL001','2012-5-7','/','/','/')"; $result = mssql_query($query) or die("无法执行sql:$query"); ?>