[phpMP-CVS] CVS: phpMP/core/dba mysql.php,1.3,1.4
Status: Pre-Alpha
Brought to you by:
heimidal
From: Cameron C. <nor...@us...> - 2003-09-14 07:41:51
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv21099 Modified Files: mysql.php Log Message: added sql_fetch_row() and made changes to sql_query() Index: mysql.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/core/dba/mysql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** mysql.php 14 Sep 2003 07:20:43 -0000 1.3 --- mysql.php 14 Sep 2003 07:41:48 -0000 1.4 *************** *** 27,32 **** var $db_query_result = 0; var $db_query_count = 0; ! var $row = array(); ! var $rowset = array(); // --- 27,32 ---- var $db_query_result = 0; var $db_query_count = 0; ! var $db_row = array(); ! var $db_rowset = array(); // *************** *** 116,119 **** --- 116,121 ---- if( $this->db_query_result) { + unset($this->db_row[$this->db_query_result]); + unset($this->db_rowset[$this->db_query_result]); return $this->db_query_result; } *************** *** 128,131 **** --- 130,153 ---- return false; } + } + } + + // + // sql_fetch_row + // + function sql_fetch_row($db_query_id = 0) + { + if(! $db_query_id) + { + $db_query_id = $this->db_query_result; + } + + if( $this->db_row[$db_query_id] = @mysql_fetch_array($query_id)) + { + return $this->db_row[$db_query_id]; + } + else + { + return false; } } |