简体   繁体   中英

Can't access the results of MS SQL stored procedure with PHP

This area seems to be a "black hole" where I can't find any info on the web, any help is greatly appreciated.

I have a stored procedure that outputs a table. The problem is I can't access the results with my php code.

I called the stored procedure like this:

$table_init=mssql_init('joblisting_selector', $DBhandle) or die("Couldn't call stored procedure");
$table=mssql_execute($table_init, 'param');

This part doesn't return any errors but I have no way of accessing the table this procedure is supposed to return. if I do a var_dump($table) it returns as bool(false). If I try to use mssql_fetch_assoc($table) it returns null.

Does anyone know how to access a table that is created by a stored function?

mssql_execute returning false means it did not succesfully execute your statement/procedure. if it returns false you should check out the result of mssql_get_last_message() which will give you specifics on your error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM