Update of /cvsroot/phpsqliteadmin/phpsqliteadmin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28511
Modified Files:
SPSQLite.class.php
Log Message:
Added numFields() and fieldName()
Index: SPSQLite.class.php
===================================================================
RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/SPSQLite.class.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SPSQLite.class.php 11 May 2004 18:23:28 -0000 1.1.1.1
+++ SPSQLite.class.php 21 May 2004 19:17:52 -0000 1.2
@@ -643,6 +643,8 @@
}
}
+ // }}}
+
// {{{ lastInsertId()
/**
@@ -965,10 +967,14 @@
return $cols;
}
+ // }}}
+
/*
HERE STARTS ADD-ON TO SPSQLITE CLASS TO FIT PHPSLA NEEDS
*/
+ // {{{ function listTables()
+
function listTables() {
$query = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name";
@@ -992,6 +998,10 @@
}
+ // }}}
+
+ // {{{ function dbInfo()
+
function dbInfo() {
$dbInfo['size'] = filesize($this->_file);
@@ -1005,6 +1015,10 @@
}
+ // }}}
+
+ // {{{ function fetchArray()
+
function fetchArray($type = 'num') {
if (isset($type)) {
@@ -1017,15 +1031,37 @@
}
+ // }}}
+
+ // {{{ function vaccum()
+
function vacuum() {
$this->query("VACUUM");
}
-}
+ // }}}
+
+ // {{{ numFields()
+
+ function numFields()
+ {
+ return sqlite_num_fields($this->_result);
+ }
// }}}
+
+ // {{{ function fieldName()
+
+ function fieldName($i)
+ {
+ return sqlite_field_name($this->_result, $i);
+ }
+
+ // }}}
+
+}
/*
This product includes PHP, freely available from
|