Update of /cvsroot/phpmp/phpMP/core/dba
In directory sc8-pr-cvs1:/tmp/cvs-serv744/core/dba
Modified Files:
mysql.php
Log Message:
wibble. added more functions.
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpmp/phpMP/core/dba/mysql.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** mysql.php 14 Sep 2003 08:11:55 -0000 1.5
--- mysql.php 15 Sep 2003 03:13:52 -0000 1.6
***************
*** 173,176 ****
--- 173,249 ----
return $rowset;
}
+
+ //
+ // sql_insert_id
+ //
+ function sql_insert_id()
+ {
+ if( $this->db_connection_id)
+ {
+ if( $result = @mysql_insert_id($this->db_connection_id))
+ {
+ return $result;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //
+ // sql_free_result
+ //
+ function sql_free_result($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ unset($this->db_row[$db_query_id]);
+ unset($this->db_rowset[$db_query_id]);
+
+ if( @mysql_free_result($db_query_id))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //
+ // sql_error
+ //
+ function sql_error($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ $result = @mysql_error($db_query_id);
+ return $result;
+ }
+
+ //
+ // sql_errno
+ //
+ function sql_errno($db_query_id = 0)
+ {
+ if(! $db_query_id)
+ {
+ $db_query_id = $this->db_query_result;
+ }
+
+ $result = @mysql_errno($db_query_id);
+ return $result;
+ }
} // End of sql_db
?>
|