Stored Procedures, MySQL and PHP

前端 未结 5 1561
故里飘歌
故里飘歌 2020-11-30 08:35

The question is a fairly open one. I\'ve been using Stored Procs with MS SQLServer for some time with classic ASP and ASP.net and love them, lots.

I have a small hob

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 09:02

    I have been using ADODB, which is a great thing for abstracting actual commands to make it portable between different SQL Servers (ie mysql to mssql). However, Stored procedures do not appear to be directly supported. What this means, is that I have run a SQL query as if it is a normal one, but to "call" the SP. An example query:

    $query = "Call HeatMatchInsert('$mMatch', '$mOpponent', '$mDate', $mPlayers, $mRound,  '$mMap', '$mServer', '$mPassword', '$mGame', $mSeason, $mMatchType)";
    

    This isn't accounting for returned data,which is important. I'm guessing that this would be done by setting a @Var , that you can select yourself as the return @Variable .

    To be Abstract though, although making a first php stored procedure based web app was very difficult to work around (mssql is very well documented, this is not), It's great after its done - changes are very easy to make due to the seperation.

提交回复
热议问题