PHP Classes

Mysql DBObj: Compose and execute MySQL database SELECT queries

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 60%Total: 668 This week: 1All time: 4,834 This week: 560Up
Version License Categories
mysqldbobj 1.0GNU General Publi...Databases
Description 

Author

This class is meant to simplify the composition and execution of MySQL database SELECT queries.

It has functions that can establish the database connection and others to specify the query conditions, columns to sort the results, result row limits and execute the queries.

Picture of Vinicius
Name: Vinicius <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 38
All time rank: 2897210 in Brazil Brazil
Week rank: 416 Up36 in Brazil Brazil Up

Details

Class Author: Vinícius Augusto Talgliatti Zani Date: 05-28-2004 Mysql Class Documentation --------------------------- Topics 1. What does this class do? 2. Getting Started 3. A simple script 4. Functions 5. Bugs --------------- 1. What does this class do? --------------- This class does many things with your mysql database. It's like PEAR DB_DataObject, but it has lower resources :) With this class, you can perform connections, add limits, orders, wheres, anything you want. --------------- 2. Getting Started --------------- Open the class Mysql and take a look at that. Customise the class (you DON'T have to configure this class), and start using! --------------- 3. A simple script --------------- $my_connection = new Mysql("host","User","passwd"); $my_connection->selectDb("myDb"); $my_connection->limit(0,20); $my_connecton->query("SELECT * FROM my_table"); while ($theObj = $my_connection->fetch()) { echo $theObj->field; } // easy, ahn? :) ---------------- 4. Functions [list] ---------------- Mysql([string, [string, [string]]]) Connects to the database OR (if no parameters) initializes the object assign(resource_link_identifier) Assigns a mysql connection link to the object selectDb(string) Selects the database for using query(string, bool) Makes a query and executes, if bool = true find() Executes the query stored in the object mountQuery() Returns a string with the mounted query for using in mysql count() Count affected rows of the last query limit(int, [int]) Limits the actual query whereAdd(string) Adds a where clause to the object orderBy(string) Order the object query fetch() Fetches an object with the last query executed fetchToThis() Fetches an object INSIDE itself escape(string) Escapes a string setError(string) Add error to the object showErrors(bool) Prints the errors (if they exists) at the screen. If bool == true, the program dies. ---------------- 5. Bugs ---------------- I haven't detected bugs in this class, YET. But they might exists. ----------------------------------------------------- Thank you for using my class. If you liked it, tell me: <viniciustz@mtv.com.br>

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example An example showing how does it works.
Plain text file Mysql.class.php Class The class
Accessible without login Plain text file readme.txt Doc. About the class and its functions.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:668
This week:1
All time:4,834
This week:560Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:1105