hi!
i found this in the mysql docs.. and it's irritating me: how can my_ulonglong
have a value of -1?
---- snip ----
22.4.1 mysql_affected_rows()
my_ulonglong mysql_affected_rows(MYSQL *mysql)
22.4.1.1 Description
Returns the number of rows affected (changed) by the last UPDATE, DELETE or
INSERT query. May be called immediately after mysql_query() for
UPDATE, DELETE, or INSERT statements. For SELECT statements,
mysql_affected_rows() works like mysql_num_rows().
mysql_affected_rows() is currently implemented as a macro.
22.4.1.2 Return Values
An integer greater than zero indicates the number of rows affected or
retrieved. Zero indicates that no records matched the WHERE clause in the
query or
that no query has yet been executed. -1 indicates that the query returned an
error or that, for a SELECT query, mysql_affected_rows() was called
prior to calling mysql_store_result().
22.4.1.3 Errors
None.
22.4.1.4 Example
mysql_query(&mysql,"UPDATE products SET cost=cost*1.25 WHERE group=10");
printf("%d products updated",mysql_affected_rows(&mysql));
--
# till busch, reschgasse 5/24, 1120 wien, austria
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php