PHP: sesam_affected_rows - Manual

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

search for in the

sesam_commit SESAM

Last updated: Sat, 27 Jan 2007

view this page in

# sesam_affected_rows

(PHP 3 CVS only)

sesam_affected_rows -- Get number of rows affected by an immediate query

## Description

int sesam_affected_rows ( string result_id )

`result_id` is a valid result id returned by sesam_query().

Returns the number of rows affected by a query associated with `result_id`.

The sesam_affected_rows() function can only return useful values when used in combination with "immediate" SQL statements (updating operations like `INSERT`, `UPDATE` and `DELETE`) because SESAM does not deliver any "affected rows" information for "select type" queries. The number returned is the number of affected rows.

Пример 1. sesam_affected_rows() example

`<?php
$result = sesam_execimm("DELETE FROM PHONE WHERE LASTNAME = '" . strtoupper($name) . "'");
if (!$result) {
/* ... error ... */
}
echo sesam_affected_rows($result).
" entries with last name " . $name . " deleted.\n";
?>`

See also sesam_query() and sesam_execimm().

add a note User Contributed Notes
sesam_affected_rows
There are no user contributed notes for this page.
sesam_commit SESAM

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 11:33:19 2007 PST