PHP Classes

Query in any table: Compose and execute SQL SELECT queries

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 188 All time: 8,614 This week: 455Up
Version License PHP version Categories
managerexample 1.0.0Freely Distributable5PHP 5, Databases
Description 

Author

This class can compose and execute SQL SELECT queries.

It as parameters a table name, list of fields, a condition clause and an optional limit number of rows to retrieve.

The class executes a SQL SELECT query and returns the results in an array.

Picture of DZEUKOU YVES
Name: DZEUKOU YVES <contact>
Classes: 1 package by
Country: Gabon Gabon
Age: ???
All time rank: 41771 in Gabon Gabon
Week rank: 321 Up1 in Gabon Gabon Equal

Example

<?php
   
/* ydzeukou@gmail.com */

    /*This is just an example of the usage
    not really a working application
   
    EXAMPLE TABLE
    -------------
    CREATE TABLE IF NOT EXISTS `myTable` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `firstName` varchar(255) NOT NULL,
      `lastName` varchar(255) NOT NULL,
      `town` varchar(255) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    */

   
$data = "myData";
   
$login = "root";
   
$pwd = "";

    try{
       
$db = new PDO("mysql:host=localhost;dbname=$data","$login","$pwd");
    catch(
Exception $e)
    {
        die(
'Error...');
    }
    require
'managerClass.php';

   
$manager = new RenderModel($db);

   
$myTable = $manager->fetchs("myTable",array('*'),array('town ='=>"libreville"));
   
//$myTable = $manager->fetchs("myTable",array('*'),array('town ='=>"libreville"),10);

   
printr_($myTable);
?>


  Files folder image Files  
File Role Description
Plain text file managerClass.php Class table manager
Accessible without login Plain text file managerExample.php Example manager example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:188
This week:0
All time:8,614
This week:455Up