ÖÕÓڸ㶨PHPÁ¬½ÓSQLServer2005.
ΪÁËphpÁ¬½Ósql2005 ,ÎÒÔÚÍøÂçÉÏÕÒÁËÒ»´ó¶Ñ×ÊÁÏÔÚÎÒµÄcsdn²©¿ÍÖÐ.ÍíÉÏ3:05·ÖʱºòÖÕÓڸ㶨ÁË phpÁ¬½Ósql2005µÄÎÊÌâ,ÏÖÔÚÕûºÏ,ͬʱ°ÑFAQÕûºÏÉÏ. ÎÒÇ°ÃæдµÄ½Ì³Ì: Á¬½ÓÇ°ÅäÖÃϵͳ: 1.¼ì²éÎļþ php5.2.5\ntwdblib.dll ĬÈÏÏÂÃæÓÐÒ»¸ö,²»ÄÜÁ¬½ÓÔÙÌæ»». ÏÂÔØÕýÈ·°æ±¾µÄ ntwdblib.dll (2000.80.194.0)£¬µØÖ·£º http://webzila.com/dll/1/ntwdblib.zip 2.ÅäÖÃphp a¡¢´ò¿ªphp.in½«extension=php_mssql.dllµÄ×¢ÊÍ·ûºÅÈ¥µô¡£ b¡¢´ò¿ªphp.in½«mssql.secure_connection = Off¸ÄΪon¡£ c¡¢½«php_mssql.dll¿½±´µ½php.inÖÐextension_dir Ö¸¶¨µÄĿ¼»òÕßϵͳsystem32Ŀ¼Ï¡£(php_mssql.dllÔÚphpµÄѹËõ°²×°°üÖÐÓÐ)¡£ ÒÔÉϲ½ÖèÍê³ÉºóÐèÒªÖØÆôapache¡£ ×¢Ò⣺ʵ¼ÊʹÓÃÖз¢ÏÖ Èç¹ûͨ¹ýphpѹËõÎļþÊÖ¹¤°²×°phpµ½iisÏ£¬±ØÐëÖØÆô»úÆ÷¶ø²»½ö½öÊÇiis¡£ 3.ÅäÖÃsqlserver
a. ÔËÐÐ SQL Server ÅäÖùÜÀíÆ÷£ºSQL Server Configuration Manager£¬´ò¿ªÐÒé Protocols
b. ÔÊÐíÃüÃû¹ÜµÀ "named pipes" ºÍ "tcp/ip"
c. ÓÒ¼üµã»÷ "tcp/ip"£¬´ò¿ªÊôÐÔ Properties ±êÇ© "IP addresses"
d. ÔÚ TCP ¶¯Ì¬¶Ë¿Ú "TCP Dynamic Ports" ÌîÈë 1433
e. ÖØÆô SQL Server -----------------------------------------------------------------------------------------------
4.ʹÓÃÒÔÏ·½Ê½Á¬½ÓMS SQL Server 2005£º
´úÂëÈçÏ£º ÊäÈëhttp://127.0.0.1 ----------------------------------------------------------------------- 5.FAQ³£¼ûÎÊÌâ: 1±¨´í: Fatal error: Call to undefined function mssql_connect() ½â¾ö: ʹÓÃMSSQL_ϵÁк¯Êý
ҪʹÓÃÕâÁ½ÖÖ¶¼ÐèÒªÔÚphp.ini½øÐÐÉ趨£º
(1)ÔÊÐí DCOM£¬ÐèÒª½«php.iniÖÐµÄ ;com.allow_dcom=TRUEÇ°µÄ·ÖºÅ";"È¥µô¡£
(2)ʹÓÃMSSQLÀ©Õ¹£¬ÐèÒªphp.iniÖÐµÄ ;extension=php_mssql.dllÇ°µÄ·ÖºÅ";"È¥µô¡£(¹Ø¼ü)
(3)È·ÈÏextension_dirΪÕýȷ·¾¶,ÒÔ±¾»úΪÀý£ºextension_dir = "c:\AppServ5.2.6\php\ext"¡£
(4)Èç¹ûÈÔÈ»»úÆ÷±¨´í˵ÕÒ²»µ½c:\AppServ5.2.6\php\ext\php_mssql.dllµ«Ã÷Ã÷´æÔÚÕâ¸öÎļþ¡£
½â¾ö·½·¨£º½«php_mssql.dll,ntwdblib.dll¿½±´µ½ÏµÍ³Ä¿Â¼\system32ÏÂÖØÆô²âÊÔ¡£¡£
(×¢:ÉÏÃæÁ½¸ödllÎļþ²»ÔÚÏàͬĿ¼Ï£¬ÎÒµÄΪc:
Ïà¹ØÎĵµ£º
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/yf520gn/archive/2008/09/26/2982363.aspx
SELECT * from TB_MILES_CB_ORDER
WHERE convert(varchar(100),ORDER_DATE,102)= £¿
ORDER BY ORDER_NO
SELECT CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
SELECT CONVERT(varchar(100), GETDATE ......
--TOP n ʵÏÖµÄͨÓ÷ÖÒ³´æ´¢¹ý³Ì(ת×Ô×Þ½¨)
CREATE PROC sp_PageView
@tbname sysname, --Òª·ÖÒ³ÏÔʾµÄ±íÃû
@FieldKey nvarchar(1000), --ÓÃÓÚ¶¨Î»¼Ç¼µÄÖ÷¼ü(Ωһ¼ü)×Ö¶Î,¿ÉÒÔÊǶººÅ·Ö¸ôµÄ¶à¸ö×Ö¶Î
@PageCurrent int=1, --ÒªÏÔʾµÄÒ³Âë
@PageSize int=10, - ......
ÈçºÎ²é¿´SQL SERVERÊý¾Ý¿âµ±Ç°Á¬½ÓÊý
1.ͨ¹ý¹ÜÀí¹¤¾ß
¿ªÊ¼->¹ÜÀí¹¤¾ß->ÐÔÄÜ£¨»òÕßÊÇÔËÐÐÀïÃæÊäÈë mmc£©È»ºóͨ¹ýÌí¼Ó¼ÆÊýÆ÷Ìí¼Ó SQL µÄ³£ÓÃͳ¼Æ È»ºóÔÚÏÂÃæÁгöµÄÏîÄ¿ÀïÃæÑ¡ÔñÓû§Á¬½Ó¾Í¿ÉÒÔʱʱ²éѯµ½Êý¾Ý¿âµÄÁ¬½ÓÊýÁË¡£²»¹ý´Ë·½·¨µÄ»°ÐèÒªÓзÃÎÊÄÇ̨¼ÆËã»úµÄȨÏÞ£¬¾ÍÊÇҪͨ¹ýWindowsÕË»§µÇ½½øÈ¥²Å¿ÉÒÔÌí¼Ó´Ë¼ÆÊ ......
sqlserver×Ö·û´®²ð·Ö(split)·½·¨»ã×Ü
--·½·¨0£º¶¯Ì¬SQL·¨
declare @s varchar(100),@sql varchar(1000)
set @s='1,2,3,4,5,6,7,8,9,10'
set @sql='select col='''+ replace(@s,',',''' union all select ''')+''''
PRINT @sql
exec (@sql)
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ ......
ÓÐÍâÀ´³ÌÐò°²×°»ùÓÚ.NET FRAMEWORK 3.5µÄÓ¦ÓóÌÐòÔÚÄÚÍøµÄPCÉÏ£¬ÐèҪͨ¹ýISA·À»ðǽ¿Í»§¶Ë¾¹ý·þÎñÆ÷ÉϵÄISA2006 SP1·ÃÎÊÍâÍøµÄSQLSERVER2005Êý¾Ý¿â¡£
°´ÕÕÒÔÍù¾Ñ飬ÐèÒªÅäÖÃÒ»ÌõSQLSERVER2005·þÎñÆ÷ËùÔÚµÄIPµØÖ·µÄ³öÕ¾¹æÔò£¬²¢ÇÒ²¢²»ÐèÒªÉèÖÃÒ»Ìõ»ùÓÚÓòÃûµÄ¹æÔò¡£
&nb ......