downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

mssql_select_db> <mssql_result
[edit] Last updated: Tue, 21 May 2013

view this page in

mssql_rows_affected

(PHP 4 >= 4.0.4, PHP 5, PECL odbtp >= 1.1.1)

mssql_rows_affected Restituisce il numero di record coinvolti dalla query

Descrizione

int mssql_rows_affected ( resource $id_connessione )
Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.



add a note add a note User Contributed Notes mssql_rows_affected - [1 notes]
up
0
rowan dot collins at gmail dot com
5 years ago
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
?>

 
show source | credits | sitemap | contact | advertising | mirror sites