Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÖÕÓڸ㶨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:


Ïà¹ØÎĵµ£º

SqlServer´æ´¢¹ý³Ì·ÖÒ³

--TOP n ʵÏÖµÄͨÓ÷ÖÒ³´æ´¢¹ý³Ì(ת×Ô×Þ½¨)
CREATE PROC sp_PageView
@tbname sysname, --Òª·ÖÒ³ÏÔʾµÄ±íÃû
@FieldKey nvarchar(1000), --ÓÃÓÚ¶¨Î»¼Ç¼µÄÖ÷¼ü(Ωһ¼ü)×Ö¶Î,¿ÉÒÔÊǶººÅ·Ö¸ôµÄ¶à¸ö×Ö¶Î
@PageCurrent int=1, --ÒªÏÔʾµÄÒ³Âë
@PageSize int=10, - ......

Sqlserver È¡ºº×ֵĵÚÒ»¸ö×Öĸ£¬·½±ãÄ£ºý²éѯ

 create function comm_getpy
(
    @str nvarchar(4000)
)
returns nvarchar(4000)
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@str)>0
begin
    set @word=left(@str,1)
    --Èç¹û·Çºº×Ö×Ö·û£¬·µ»ØÔ­×Ö·û
& ......

java µ÷ÓÃͨÓô洢¹ý³Ì£¨Sqlserver£©


package com.wfy.system.dao;   
  
import java.sql.CallableStatement;   
import java.sql.Connection;   
import java.sql.ResultSet;   
import java.sql.SQLException;   
import java.sql.Types;    ......

sqlserver µÄprepare·½·¨Ê¹ÓÃÎÊÌâ

1.Èç¹ûÏÈprepare ºóÌí¼Ó²ÎÊý£¬ÕâÑùÒ»²¿·ÖÊý¾ÝÀàÐÍ¿ÉÒÔ²»ÓÃÉèÖÃÆäsize´óС£¬ÀýÈçchar
2.Èç¹ûÏÈÌí¼Ó²ÎÊýÔÙprepare£¬¾Í±ØÐëÉèÖòÎÊýµÄÀàÐÍ£¬´óС£¬¾«¶È²ÅÄÜͨ¹ý£¬±ÈÈçchar,varchar,decimalÀàÐÍ£¬¶øint,floatÓй̶¨×Ö½ÚÀàÐ͵ÄÊý¾ÝÀàÐÍÔò¿É²»ÓÃÉèÖôóС¡£
3.¹ØÓÚSqlServerµÄtimestampÀàÐÍ£º¸ÃÀàÐÍΪSqlServerµÄʱ¼ä´ÁÀàÐÍ£¬´´½ ......

blogÔ´ÂëÕûÀí£ºphp+mysql²©¿Í³ÌÐò25ÖÖ

Blogϵͳ×÷Ϊ´ó¼Ò×î³£½Ó´¥µÄ»¥ÁªÍø¶«¶«£¬ÔÚÕ¾³¤ÈºÌåÖм¸ºõÈËÊÖÒ»²©£¬´ÓÖªÃûÃÅ»§µÄ²©¿ÍƵµÀ£¬µ½ÍøÂçÓªÏúר¼Ò²©¿Í£¬ÍøÃñ¶Ô²©¿ÍµÄ¹Ø×¢¶ÈÔÚ²»¶ÏÌá¸ß²¢É¡£Ä¿Ç°ÍøÉÏÃâ·ÑµÄblogϵͳ̫ÔÓ£¬ÔÚ´ËÕûÀíPHP°æµÄBlog½éÉÜÈçÏ£º
1¡¢wordpress:http://www.wordpress.org ¹¦ÄÜÒ²ºÜÈ«Ã棬Ӧ¸ÃÊÇÖ§³ÖblogµÄÊ×Ñ¡¡£ËüÓÐ×îÇ¿µÄÄ£°æ¹¦ÄÜ£¬ÒѾ­ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ