note 58601 added to function.mysql-info

From: Date: Wed, 09 Nov 2005 11:25:18 +0000
Subject: note 58601 added to function.mysql-info
Groups: php.notes 
Request: Send a blank email to php-notes+get-98322@lists.php.net to get a copy of this message
Imade a quick conversion of eric's function just to count matched or affected rows from a query. /**GD gdf_db_count_query_v1: returns the amount of rows matched or affected by the last query. Must be used immediately after the concerned query. */ function gdf_db_count_query($link = 'dbh') { $info_str = mysql_info($$link); if (ereg("Records: ([0-9]*)", $info_str, $count) == false) { ereg("Rows matched: ([0-9]*)", $info_str, $count); } return $count; } ---- Manual Page -- http://www.php.net/manual/en/function.mysql-info.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58601 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58601&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58601&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98322) next »