<?php
$Connect = mssql_connect("XXXXXX","XXXXXX","XXXXXX") ;
$con=mssql_select_db("INTRANET");
$sql = "EXEC WBIADMIN_Q";// procedure ครับ
$sql.= " @ITYPE = 'TEST'";
$que = mssql_execute($sql);
echo $que;
//$fet=mssql_fetch_array($que);
mssql_close($Connect);
?>
ใน procedure ครับ
USE [INTRANET]
GO
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[WBIADMIN_Q]
@ITYPE CHAR(02) = NULL,
IF @ITYPE = 'TEST' GOTO TEST
TEST:
SELECT * FROM TEST
return
จะดึงข้อมูลออกมายังครับ
$que = mssql_execute($sql); ก้ ERROR
mssql_execute(): supplied argument is not a valid MS SQL-Statement resource in C:\AppServ\www\test\test.php on line 6
mssql_query
[function.mssql-query]: message: Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. (severity 16) in C:\AppServ\www\test\test.php on line 6
ช่วยหน่อยครับบบบ