Handles the database connection. This is the database abstraction layer. You
can replace this file by a copy of it to support other database systems than
MySQL. This class uses the 'mysql' PHP extension.
| AddField | Add a field (column) to a table |
| AddIndex | Add an index to a table |
| AddRecord | Add a new record |
| AffectedRows | Get the number of rows affected by the last operation |
| ChangeField | Alter a field (column) name or type in a table |
| ChangeRecord | Change a record |
| Close | Terminate connection to DB server |
| CreateTable | Create a new table in our database |
| Exec | Run an SQL query on the database |
| FastQuery |
Perform query and get first record in one call Further calls of GetRecord are possible Parameters are the same as with the above Set*() function calls |
| FastQuery1st |
Same as FastQuery but return the first column's value Further calls of GetRecord are possible |
| FastQuery1stArray | Same as FastQuery1st, but copies all records in an array |
| FastQueryArray | Same as FastQuery1stArray, but copies records ENTIRELY into the array |
| Forget | Forget login account data, for security reasons |
| GetCount | Get the total number of database queries so far |
| GetRecord | Get next recordset of previous query |
| GetTableSize | Get database table size, depends on table_status() |
| GetTime | Get the total amount of time spent in queries so far |
| IsConnected | Check if we're connected |
| LastError | Tell the last error |
| ListTableCols | Get a list of all columns in a table |
| NewQuery | Reset all parameters for a new query |
| Open | Establish connection to DB server |
| QueryFields | Perform query on given fields |
| RemoveField | Remove a field (column) from a table |
| RemoveIndex | Remove an index from a table |
| RemoveRecord | Delete a record |
| RemoveTable | Remove a table from our database |
| RenameTable | Rename a table |
| ResetStat | Reset internal statistics counters |
| SetGroup | Set new group for queries (GROUP BY section) |
| SetHaving | Set new having for queries (HAVING section) |
| SetLimit | Set new limit for queries (LIMIT section) |
| SetOrder | Set new order for queries (ORDER BY section) |
| SetTable | Set new table name for queries (FROM section) |
| SetWhere | Set new criteria for queries (WHERE section) |
Implementation file: unb_lib/database.lib.php, line 23
© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.