Thursday, March 8, 2012

Can I use stored procedures with PHP via ODBC bridge?

Hey Everyone,

I am a stored procedures newbie, so I wanted to ask if it is possible
to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
server. I am simply use the commands from the php odbc library to
connect and execute the SQL commands, I am trying to avoid building
dynamic queries, so stored proceddures seem to be the answer. I know
that there are only certain environments stored procedures can be used
within. Thank you for all of your help.Storedprocs can be started through queries which should not bring any
problems in using them with PHP, but test it.
I don't know how the query_resource (return value) is handled in a
Stored proc but I believe any return values wll be returned in fieldlike
structures.
Anyway thats how it works in Pascal...
Working in PHP&MySQL platforms haven't given me the opportunity to test
that functionality in PHP.

Regards,
Toke Herkild

gene.ellis@.gmail.com wrote:
> Hey Everyone,
> I am a stored procedures newbie, so I wanted to ask if it is possible
> to use them with PHP via an ODBC-ODBC bridge connected to a MS SQL
> server. I am simply use the commands from the php odbc library to
> connect and execute the SQL commands, I am trying to avoid building
> dynamic queries, so stored proceddures seem to be the answer. I know
> that there are only certain environments stored procedures can be used
> within. Thank you for all of your help.|||Yes, it it is possible, and works OK.

Check out the latest PHP manual ==> Function Reference ==> Microsoft
SQL Server Functions ==> mssql_execute().

HTH,
Rob

No comments:

Post a Comment