[phpMP-CVS] CVS: phpMP/core/dba mysql.php,1.10,1.11
Status: Pre-Alpha
Brought to you by:
heimidal
From: Cameron C. <nor...@us...> - 2003-09-17 03:02:47
|
Update of /cvsroot/phpmp/phpMP/core/dba In directory sc8-pr-cvs1:/tmp/cvs-serv7215/core/dba Modified Files: mysql.php Log Message: added some more functions, and hopefully got them all... if not I blame Adam. Index: mysql.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/core/dba/mysql.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** mysql.php 16 Sep 2003 01:05:21 -0000 1.10 --- mysql.php 17 Sep 2003 03:02:42 -0000 1.11 *************** *** 253,259 **** } ! if(! $result = @mysql_num_fields($db_connect_id)) { return $return; } else --- 253,380 ---- } ! if( $result = @mysql_num_fields($db_connect_id)) { return $return; + } + else + { + return false; + } + } + + // + // sql_field_name + // + function sql_field_name($db_query_id = 0, $field_offset) + { + if(! $db_query_id) + { + $db_query_id = $this->db_query_result; + } + + if( $result = @mysql_fielf_name($db_query_id, $field_offset)) + { + return $result; + } + else + { + return false; + } + } + + // + // sql_field_type + // + function sql_field_type($db_query_id = 0, $field_offset) + { + if(! $db_query_id) + { + $db_query_id = $this->db_query_result; + } + + if( $result = @mysql_field_type($db_query_id, $field_offset)) + { + return $result; + } + else + { + return false; + } + } + + // + // sql_fetch_field + // + function sql_fetch_field($db_query_id = 0, $field_row = -1, $field_name) + { + if(! $db_query_id) + { + $db_query_id = $this->db_query_result; + } + + if( $field_row > -1) + { + $result = @mysql_fetch_field($db_query_id, $field_row, $field_name); + } + else + { + if( empty($this->db_row[$db_query_id]) && empty($this->db_rowset[$db_query_id])) + { + if( $this->sql_fetch_row($db_query_id)) + { + $result = $this->db_row[$query_id][$field_name]; + } + } + else + { + if( $this->db_rowset[$db_query_id]) + { + $result = $this->db_rowset[$db_query_id][$field_name]; + } + else if( $this->db_row[$db_query_id]) + { + $result = $this->db_row[$query_id][$field_name]; + } + } + } + + return $result; + } + + // + // sql_affected_rows + // + function sql_affected_rows() + { + if( $this->db_connection_id) + { + if( $result = @mysql_affected_rows($this->db_connection_id)) + { + return $result; + } + else + { + return false; + } + } + else + { + return false; + } + } + + // + // sql_row_seek + // + function sql_row_seek($db_query_id = 0, $row) + { + if(! $db_query_id) + { + $db_query_id = $this->db_query_result; + } + + if( $result = @mysql_row_seek($db_query_id, $row)) + { + return $result; } else |