pcorreia
Posts: 15
|
| Posted: 08/16/2007, 10:01 AM |
|
The affected_rows() method of the DB_MSSQL Class calls to a non-existing php function:
function affected_rows() {
return mssql_affected_rows($this->Query_ID);
}
The correct function name is mssql_rows_affected()
http://de3.php.net/mssql-rows-affected
also the function takes the connection resource id as input so the method should look like this:
function affected_rows() {
return mssql_rows_affected($this->Link_ID);
}
This was probably a oversight problem originated by addapting mysql code to mssql.
Cheers,
_________________
pc |
 |
 |
DonB
|
| Posted: 08/16/2007, 1:31 PM |
|
You are mistaken.
--
DonB
http://www.gotodon.com/ccbth
"pcorreia" <pcorreia@forum.codecharge> wrote in message
news:546c482de4aa70@news.codecharge.com...
> The affected_rows() method of the DB_MSSQL Class calls to a non-existing
php
> function:
>
> function affected_rows() {
> return mssql_affected_rows($this->Query_ID);
> }
>
> The correct function name is mssql_rows_affected() so the method should
look
> like this:
>
> function affected_rows() {
> return mssql_rows_affected($this->Query_ID);
> }
>
> This was probably a oversight problem originated by addapting mysql code
to
> mssql.
>
> Cheers,
> _________________
> pc
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
pbarr
Posts: 1
|
| Posted: 08/16/2007, 4:06 PM |
|
Im getting:
PHP Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\wwwroot\Admin\db_mssql.php on line 60
There is no function mssql_connect() .
Is this the same problem referenced above?? Is there a way I can fix it. I know that ODBC works, how do I tell codecharge to use the odbc connections?
Any help is appreciated.
Phil
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 08/16/2007, 6:50 PM |
|
Sorry to disappoint you but your are 100% INCORRECT
http://us3.php.net/manual/en/function.mssql-connect.php
I happen to use it against SQL Server day in and day out.
Check your php installation to make sure you have the mssql library loaded.
If you are running on a Linux/Unix server, you also need some additional
packages installed on the system.
If you are running on Windows, make sure you have all the necessary SQL
dll's in addition to the php dll.
Check your error logs - both php and server. They may indicate if you have
a specific DLL missing.
|
|
|
 |
DonB
|
| Posted: 08/16/2007, 7:05 PM |
|
Mmm, it appears I was mistaken. The last thing I read in your 1st post was
'mysql'. Seems you really DID mean MS SQL Server? If so, then there won't
be any such function in PHP unless you FIRST load the mssql extension http://www.php.net/manual/en/ref.mssql.php
--
DonB
http://www.gotodon.com/ccbth
"pbarr" <pbarr@forum.codecharge> wrote in message
news:546c4d87d1024a@news.codecharge.com...
> Im getting:
>
> PHP Fatal error: Call to undefined function mssql_connect() in
> C:\Inetpub\wwwroot\wwwroot\Admin\db_mssql.php on line 60
>
> There is no function mssql_connect() .
>
> Is this the same problem referenced above?? Is there a way I can fix it.
I
> know that ODBC works, how do I tell codecharge to use the odbc
connections?
>
> Any help is appreciated.
>
> Phil
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
pcorreia
Posts: 15
|
| Posted: 08/17/2007, 8:26 AM |
|
Quote DonB:
Would you care to elaborate on how am i mistaken?
The function mssql_affected_rows simply does not exist.
On the other hand the mssql_rows_affected function does exist:
Quote :
mssql_rows_affected
(PHP 4 >= 4.0.4, PHP 5)
mssql_rows_affected -- Returns the number of records affected by the query
Description
int mssql_rows_affected ( resource link_identifier )
Warning
This function is currently not documented; only the argument list is available.
Parameters
link_identifier
A MS SQL link identifier, returned by mssql_connect() or mssql_pconnect().
I found this problem when trying to use the affected_rows() method of the MSSQL Class, and got an error message saying: call to undefined function "mssql_affected_rows()"
Wich is very right since there is no php ms sql server function with that name.
_________________
pc |
 |
 |