RE: [PHP] MySQL query results

From: Date: Fri, 22 Mar 2002 23:29:11 +0000
Subject: RE: [PHP] MySQL query results
Groups: php.general 
Request: Send a blank email to php-general+get-89775@lists.php.net to get a copy of this message
$result = mysql_query(.....)' mysql_num_rows($result) -----Original Message----- From: Ashley M. Kirchner [mailto:ashley@pcraft.com] Sent: Friday, March 22, 2002 5:28 PM To: PHP-General List Subject: [PHP] MySQL query results How can I tell whether anything was matched and changed after a mysql_db_query? If I'm in MySQL's console and I perform a query, it comes back and tells me something like: Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 And if something matched, 'Rows matched' would be different, and if anything was changed, 'rows affected' would be different. How can I get that kind of results back to PHP so I can determine whether the query was actually successful in changing something (versus just being successful or not). -- W | I haven't lost my mind; it's backed up on tape somewhere. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#89775) next »