Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

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 conn_id )

Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.



add a note add a note User Contributed Notes
mssql_rows_affected
Pierre Gros
30-Jul-2007 03:19
i don't know why, but on my linux debian with php5 I get a nice :
Fatal error: Call to undefined function mssql_rows_affected()
when I try to use this function.
So if you have some problems, try to use this :

1st function (the one with mssql_rows_affected):
<?php
function update($query){
   
mssql_query($query,$ressource);
    return
mssql_rows_affected($ressource);
}
?>

new function (the one I use now) :
<?php
function update($query){
   
mssql_query($query,$ressource);

   
$rsRows = mssql_query("select @@rowcount as rows", $ressource);
   
$rows = mssql_fetch_assoc($rsRows);
    return
$rows['rows'];
}
?>
rowan dot collins at gmail dot com
31-May-2007 08:42
Note that, as the page says, this function expects an MSSQL *Link* resource, not a *result* resource. This is a bit counter-intuitive, and differs from, for instance, pg_affected_rows (though not, apparently, mysql_affected_rows).

<?php
$link
= mssql_pconnect($db_host,$db_user,$db_pass);
mssql_select_db($db_name, $link);

$result = mssql_query('Select 1', $link);

$rows = mssql_rows_affected($result); # ERROR!
$rows = mssql_rows_affected($link); # Correct
?>

mssql_select_db> <mssql_result
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571