ÖÕÓڸ㶨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:
Ïà¹ØÎĵµ£º
ÎÒÔÚ°ÑoracleÊý¾Ýµ¼ÈësqlserverÖÐʱ£¬·¢ÏÖÔÚoracleÖÐ×ֶζ¨ÒåΪΨһË÷Òýʱ£¬²»Í¬¼Ç¼µÄ´Ë×Ö¶ÎÈç¹ûΪ¿Õ²»±»ÈÏΪÊÇÖظ´µÄ£¬µ«ÔÚsqlserverÖÐÈç¹û´Ë×Ö¶ÎΪΨһË÷Òý×ֶΣ¬²»ÔÊÐíÓÐ2¸öÒÔÉϵĿÕÖµ¡£ÓôÃÆ¡£ËùÒÔÖ»ºÃ½«sqlserverÖеÄΨһË÷Òý×Ö¶ÎÊÖ¹¤ÐÞ¸ÄΪ¼¸¸ö·Ç¿ÕµÄÖµ£¬µ«ÕâÑù³ÌÐò¿Ï¶¨Òª½øÐÐÐÞ¸ÄÁË¡£ÐèÒªÔÚ³ÌÐòÖÐΪ´Ë×Ö¶ÎÉèÖò»Öظ´ ......
ÈçºÎ²é¿´SQL SERVERÊý¾Ý¿âµ±Ç°Á¬½ÓÊý
1.ͨ¹ý¹ÜÀí¹¤¾ß
¿ªÊ¼->¹ÜÀí¹¤¾ß->ÐÔÄÜ£¨»òÕßÊÇÔËÐÐÀïÃæÊäÈë mmc£©È»ºóͨ¹ýÌí¼Ó¼ÆÊýÆ÷Ìí¼Ó SQL µÄ³£ÓÃͳ¼Æ È»ºóÔÚÏÂÃæÁгöµÄÏîÄ¿ÀïÃæÑ¡ÔñÓû§Á¬½Ó¾Í¿ÉÒÔʱʱ²éѯµ½Êý¾Ý¿âµÄÁ¬½ÓÊýÁË¡£²»¹ý´Ë·½·¨µÄ»°ÐèÒªÓзÃÎÊÄÇ̨¼ÆËã»úµÄȨÏÞ£¬¾ÍÊÇҪͨ¹ýWindowsÕË»§µÇ½½øÈ¥²Å¿ÉÒÔÌí¼Ó´Ë¼ÆÊ ......
SQLserver×Ö·û´®·Ö¸îº¯Êý
Ò»¡¢°´Ö¸¶¨·ûºÅ·Ö¸î×Ö·û´®£¬·µ»Ø·Ö¸îºóµÄÔªËظöÊý£¬·½·¨ºÜ¼òµ¥£¬¾ÍÊÇ¿´×Ö·û´®ÖдæÔÚ¶àÉÙ¸ö·Ö¸ô·ûºÅ£¬È»ºóÔÙ¼ÓÒ»£¬¾ÍÊÇÒªÇóµÄ½á¹û¡£
CREATE function Get_StrArrayLength
(
@str varchar(1024), --Òª·Ö¸îµÄ×Ö·û´®
@split varchar(10) --·Ö¸ô·ûº ......