?……
Apache是HTTP服务器,调用SQL Server是属于脚本语言的事情哦!
PHP支持调用SQL Server

解决方案 »

  1.   

    to leemars能给举个例子吗?f
      

  2.   

    LVIII. Microsoft SQL Server functions
    The MSSQL extension is available on Win32 systems only. You can use the Sybase extension to connect to MSSQL databases from other platforms. These functions allow you to access MS SQL Server database. The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools. The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini. Table of Contents
    mssql_bind — Adds a parameter to a stored procedure or a remote stored procedure 
    mssql_close — Close MS SQL Server connection
    mssql_connect — Open MS SQL server connection
    mssql_data_seek — Move internal row pointer
    mssql_execute — Executes a stored procedure on a MS-SQL server database 
    mssql_fetch_array — Fetch row as array
    mssql_fetch_assoc — Returns an associative array of the current row in the result set specified by result_id 
    mssql_fetch_batch — Returns the next batch of records 
    mssql_fetch_field — Get field information
    mssql_fetch_object — Fetch row as object
    mssql_fetch_row — Get row as enumerated array
    mssql_field_length — Get the length of a field
    mssql_field_name — Get the name of a field
    mssql_field_seek — Set field offset
    mssql_field_type — Get the type of a field
    mssql_free_result — Free result memory
    mssql_get_last_message — Returns the last message from server (over min_message_severity?) 
    mssql_guid_string — Converts a 16 byte binary GUID to a string 
    mssql_init — Initializes a stored procedure or a remote stored procedure 
    mssql_min_error_severity — Sets the lower error severity
    mssql_min_message_severity — Sets the lower message severity
    mssql_next_result — Move the internal result pointer to the next result
    mssql_num_fields — Get number of fields in result
    mssql_num_rows — Get number of rows in result
    mssql_pconnect — Open persistent MS SQL connection
    mssql_query — Send MS SQL query
    mssql_result — Get result data
    mssql_rows_affected — Returns the number of records affected by the query 
    mssql_select_db — Select MS SQL database
      

  3.   

    函數用法和mysql數據庫一樣,只是名稱變了
    mysql_xxx都換成mssql_xxx
      

  4.   

    英文的资料比较全呀,中文的就显得太旧了:SQL Server 资料库函式库 本函式库共有 16 个函式
    SQL Server 是 Microsoft 从 SyBASE 取得并修改的资料库系统,它只能在 Windows NT Server 上面执行。使用本函式只能使用 Windows NT Server 作为 PHP 的执行平台。
    Microsoft SQL Server 的 query 语法为 Transact-SQL,和 SyBASE 的语法几乎相同。本资料库可能是所有 PHP 所支援资料库中,中文书籍最多的资料库了。 mssql_affected_rows: 取得最后 query 影响的列数。 
    mssql_close: 关闭与资料库的连线。 
    mssql_connect: 连上资料库。 
    mssql_data_seek: 移动列指标。 
    mssql_fetch_array: 传回阵列资料。 
    mssql_fetch_field: 取得栏位资讯。 
    mssql_fetch_object: 传回物件资料。 
    mssql_fetch_row: 传回单列的各栏位。 
    mssql_field_seek: 设定指标到传回值的某栏位。 
    mssql_free_result: 释放传回占用记忆体。 
    mssql_num_fields: 取得传回栏位的数目。 
    mssql_num_rows: 取得传回列的数目。 
    mssql_pconnect: 开启 MS SQL 伺服器长期连线。 
    mssql_query: 送出一个 query 字串。 
    mssql_result: 取得查询 (query) 的结果。 
    mssql_select_db: 选择一个资料库。
      

  5.   

    如果你的apache不在微软的操作系统下就很麻烦了。