Re: Re(2): [phplib] phplib and PHP4 -solved (mssql,php4,phplib7.2c) From: Enrique Motilla (emotilla <email protected>)
Date: 12/15/00

THANKS for the replies!, The lib is now working, it worked finally (I used
the ISAPI to detect the errors, it was evident then that there were a couple
if variables not defined as required by php4, then returned to CGI and now
is working)...

There is only a couple of tiny things to modify to use the db_mssql.inc, the
function mssql_affected_rows doesn't exist in the original library of mssql.
So I searched and found in the php site a new way to do it:
--------------------to be changed in db_mssql.inc--------------------------
  function affected_rows() {
   $rsRows = mssql_query("select @ <email protected> as rows"); //,
$this->Query_ID);
    return mssql_result($rsRows, 0, "rows");
 // return mssql_affected_rows($this->Query_ID); ///funcion does not
exists
 // http://www.php.net/manual/admin-notes.php?last_entry=1750
  }
---------------------------------------------------------------------------
I don't know if the @@ is correct inside the select but at least it doesn;t
crash (yet) :)

Hope this is useful for someone using MSSQL and phplib7.2c and php4

Kindest regards
Enrique

----- Original Message -----
From: <fabrizio.ermini <email protected>>
To: <phplib <email protected>>
Sent: Friday, December 15, 2000 9:37 AM
Subject: Re: Re(2): [phplib] phplib and PHP4

> On 15 Dec 2000, at 10:14, nathan r. hruby wrote:
>
> > On Fri, 15 Dec 2000, Gerry W. Paterson wrote:
> >
> > > emotilla <email protected> writes:
> > > >
> > > >phpinfo() says that the mssql Extension is Enabled and running
> > > ...
> > > >
> > > >
> > > >PHP is configured to run as CGI. How can I install it as ISAPI? (is
itbetter?)
> > >
> > > Do you not need to run it as 'mod_php' rather than CGI to use
*pconnect()?
> > >
> >
> > INHO, (though I could be wrong) *_pconnect() should automagically fall
> > back to *_connect() if running as a CGI. (Maybe a mysql specfic thing
> > though)
> >
>
> Maybe it is a version mismatch. There exists different dll's for
> supporting MS-SQL under w32, one for each version i.e.
> Mssql65.dll, Mssql70.dll and so on;
>
> Maybe you've loaded one of them, but not the right one for the
> version you're using.
>
> However, the error messages "undefined function:
> mssql_pconnect()" usually means that that function is totally
> unknown to the interpreter; problems deriving for installation version
> should give different errors.
>
> Just my 0.02 Euro.
>
> Bye!
>
>
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>
> Fabrizio Ermini Alternate E-mail:
> C.so Umberto, 7 faermini <email protected>
> loc. Meleto Valdarno Mail on GSM: (keep it short!)
> 52020 Cavriglia (AR) faermini <email protected>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>