Recommend this page to a friend! |
Download .zip |
Info | View files (3) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2006-08-01 (10 years ago) | 51% | Total: 3,928 | All time: 778 This week: 1,016 |
Version | License | Categories | ||||
dozen13 1.0.0 | Freely Distributable | HTML, Databases |
Description | Author | |||||||||||||
This class can be used to access MySQL database servers and display query results in HTML tables. |
|
13-IN-A-DOZEN DATABASE YES YET AN OTHER DATABASE CLASS CREATOR: JORIS VISSER MY FIRST SELF WRITEN CLASS =-=-=-=-=-=-= tested under PHP 5.1.2 PHP 4.3.6 ==== manual var $db_HOST = "localhost"; var $db_USER = "root"; var $db_PASS = "root"; var $database = "db"; var $sqlerror = "sql could not be connected"; var $dbc ; =-=-=-=-=-=-= normal usage: <?php include("db.class.php"); $db = NEW database; ?> - assigning database class -- connection to database =-=-=-=-=-=-= database() - standard call -- connection to database =-=-=-=-=-=-= connect_db() - connect to database =-=-=-=-=-=-= query_db($query,$print = false) //1. query //2. show query (optional) - preform query -- show error if could not be executed - check if query was given -- show query when $print is given as true =-=-=-=-=-=-= close_db() - close database connection =-=-=-=-=-=-= id_db() - return last given inserted ID =-=-=-=-=-=-= affecte_db() - return affected rows in db =-=-=-=-=-=-= num_rows($q) 1. query - return number of rows in query =-=-=-=-=-=-= num_fields($q) 1. query - return number of fields from query =-=-=-=-=-=-= db_info() =-=-=-=-=-=-= fetch_db_row($fetched) 1. result from $db->query_db($query) - return as mysql_fetch_row =-=-=-=-=-=-= fetch_db_array($fetched) 1. result from $db->query_db($query) - return as mysql_fetch_array =-=-=-=-=-=-= fetch_db_assoc($fetched) 1. result from $db->query_db($query) - return as mysql_fetch_assoc =-=-=-=-=-=-= fetch_db_object($fetched) 1. result from $db->query_db($query) - return as mysql_fetch_object =-=-=-=-=-=-= get_table($query,$names='',$url='',$extrafields='') 1. query 2. names for table headers (optional) 3. Give url in field (optional) 4. Extrafields additional to rest of query (optional) - preform query -- give error - makeup given $_GET variables for sorting - give query back in table form -- makeup of table can be changed in class.inc.css Makeup 100% W3C xhtml compatible! =-=-=-=-=-=-= |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.