php½Ì³Ì µ÷ÓÃmssql´æ´¢¹ý³ÌʵÀýÓ¦ÓÃ
ÓÃmssql_initÓï¾äÓÃÓÚ³õʼ»¯´æ´¢¹ý³Ì£¬¶øºóµ÷ÓÃmssql_bindÓï¾äÖ¸¶¨´æ´¢¹ý³Ì²ÎÊý£¬×îºóµ÷ÓÃmssql_executeÖ´Ðд洢¹ý³Ì¡£
*/
//Á¬½ÓmssqlÊý¾Ý¿â½Ì³Ì·þÎñÆ÷
$link = mssql_connect("127.0.0.1", "sa", "sa") or die("Can't connect sql server");
mssql_select_db("frrc", $link) or die("Select database failure");
//³õʼ»¯²¢¼ÓÔØ´æ´¢¹ý³Ì Bigdatabase
$stmt = mssql_init("Bigdatabase", $link) or die("initialize stored procedure failure");
mssql_bind($stmt, "@pagesize", $pagesize, SQLINT4);
mssql_bind($stmt, "@start", $start, SQLINT4);
@$ms_result = mssql_execute($stmt, false);
mssql_query("DUMP TRANSACTION tempdb WITH NO_LOG");
do{
while( $ms_rs = mssql_fetch_object($ms_result) )
{
//½øÐÐÊý¾Ý´¦Àí
}
}
// msssql ´æ´¢¹ý³Ì BigdatabaseÈçÏÂ
/*
CREATE PROCEDURE Bigdatabase
@pagesize int,
@start int
AS
declare @bsql nvarchar(4000)
set @bsql = 'select top ' + str(@pagesize) + ' username,jobid,password,useremail,zcdata,ip,name,xingbie,minzu,xueli,hunyin,age,xuexiao,zyclass,zhuanye,x_suozaidi,x_suozaidi1,huji,huji1,shengao,byear,birthyear,birthmonth,birthday,dianhua,qq,gerenzhuye,selectedjob1,selectedjob2,selectedjob3,s_PWL1,s_PWL2,s_PWL3,daiyuyaoqiu,Negotiable,provideHouseNeeded,availOpts,availNotice,llcs,CONVERT(varchar(100),dlsj, 25) as dlsj,xgsj,dlcs,jsjshuiping,language_one,l_OneAbility,language_two,l_twoAbility,mandarinLevel,skillkey,jingyan,photopb,photo,phototre,mbsys,codetype,code,shouji,posts,address,jobtype,convert(varchar(8000),pingjia) as pingjia ,convert(varchar(8000),jinengzhuanchang) as jinengzhuanchang ,convert(varchar(8000),fazhanfangxiang) as fazhanfangxiang,convert(varchar(8000),other) as other from person where id not in(select top ' + str(@start) + ' id from person order
it is 21th of May. The Month of PHP Security
(http://www.php-security.org) is still running and we have reached a
vulnerability count of 40 vulnerabilities, which is nearly as much as we
disclosed during the whole Month of PHP Bugs in 2007. However there are
11 more days until the end of May and ......