前几天弄PHP调用MSSQL存储过程,搞了许久,网上资料也少之又少(特别是基于ADODB的)。
那在这我就举个基于ADODB调用MSSQL存储过程的例子吧,希望对人有所帮助。
/*
Test out params – works in PHP 4.2.3 and 4.3.3 and 4.3.8 but not 4.3.0:
CREATE PROCEDURE at_date_interval
@days INTEGER,
@start VARCHAR(20) OUT,
@end VARCHAR(20) OUT
AS
BEGIN
set @start = CONVERT(VARCHAR(20), getdate(), 101)
set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 )
END
GO
*/
$db->debug=1;
$stmt = $db->PrepareSP(‘at_date_interval’);
$days = 10;
$begin_date = ”;
$end_date = ”;
$db->InParameter($stmt,$days,’days’, 4, SQLINT4); //这里97xxoo是In参数
$db->OutParameter($stmt,$begin_date,’start’, 20, SQLVARCHAR ); //这是存储过程返 回值,可直接访问$begin_date所得到。
$db->OutParameter($stmt,$end_date,’end’, 20, SQLVARCHAR ); //同上
$db->Execute($stmt);
echo $begin_date;
echo $end_date;
这样就OK了,这简单的例子相信都能看得懂,其他的原理也是相同的。
在这里还要注意的是:$begin_date ,$end_date 一样要先赋个空值,否则结果取不到值。这就是害我搞了N久的原因了。
波比源码 » PHP基于ADODB调用MSSQL存储过程
levofloxacin 250mg sale levofloxacin pills
order avodart without prescription buy generic zofran 4mg order ondansetron 4mg online
buy aldactone 100mg pills buy valtrex for sale diflucan cost
order ampicillin generic erythromycin uk purchase erythromycin sale
buy sildenafil 50mg online oral nolvadex 20mg buy methocarbamol for sale
order suhagra sildenafil 200mg for sale order estradiol 1mg generic
lamotrigine 200mg tablet vermox 100mg usa oral tretinoin cream
tadalafil 10mg uk tadacip 20mg for sale buy voltaren 100mg online
purchase isotretinoin without prescription accutane 40mg pills buy azithromycin 500mg generic
indomethacin without prescription purchase indocin online amoxicillin 250mg cost
arimidex over the counter buy biaxin 250mg generic sildenafil 50mg generic
cialis 10mg pas cher acheter viagra acheter 200mg gГ©nГ©rique viagra en france
tadalafil 20mg generika rezeptfrei kaufen cialis kaufen ohne rezept sildenafil 200mg für männer
isotretinoin 40mg canada purchase amoxil pills ivermectin 12mg pills
order altace 10mg online cheap cost temovate azelastine 10ml ca
catapres 0.1mg pill catapres buy online cost spiriva 9 mcg
buy generic buspirone order cordarone 200mg sale order ditropan 2.5mg online
order hytrin generic azulfidine 500 mg generic order sulfasalazine 500 mg pills
benicar 10mg tablet buy calan 120mg generic cheap acetazolamide
molnupiravir pills omnicef 300 mg oral buy prevacid
imuran 100 mcg generic buy imuran pills sildenafil mail order us
revia drug naltrexone cheap order aripiprazole 30mg pills
order dapsone pill avlosulfon 100 mg price buy aceon 4mg for sale
order fluvoxamine sale glucotrol usa brand glipizide 10mg
buy nootropil online cheap viagra 50mg sildenafil mail order
buy itraconazole online cost tindamax 500mg tindamax online order
order generic glucophage order atorvastatin 40mg without prescription cialis mail order
order norvasc 5mg without prescription amlodipine online order tadalafil 40mg pills
order sildenafil sale female viagra sildenafil order lisinopril 2.5mg generic
buy prilosec pill free slots online free spins
zyvox brand buy linezolid 600 mg online cheap online casinos usa
lopressor 100mg canada buy generic lopressor order vardenafil 10mg
paper writer buy essay online uk buy sildenafil 100mg pills
order clomid 50mg sale real money casino online roulette real money
tadalafil 20mg price order viagra online cheap viagra for men over 50
xenical without prescription purchase diltiazem purchase zovirax
cialis 20mg usa order plavix 150mg generic plavix 150mg brand
zyloprim tablet zyloprim 100mg generic zetia price
motilium pills order generic tetracycline 500mg cyclobenzaprine 15mg without prescription
cozaar 25mg pills nexium 40mg uk topamax 200mg sale
colchicine 0.5mg us online casino games for real money casino online usa
tamsulosin 0.4mg uk ondansetron us aldactone 25mg canada
tadalafil 20mg brand tadalafil india cipro us
cheap fluconazole 200mg order viagra online viagra us
buy viagra 50mg without prescription sildenafil 50mg price order tadalafil 40mg online cheap
free casino slots buy tadalafil 20mg online cialis 20mg us
buy desyrel generic sildenafil 100mg generic order aurogra 100mg online cheap
buy an essay online cheap editing essays ivermectin 3mg dose
sildenafil overnight shipping usa order sildalis pills order lamotrigine 200mg generic