<?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);
?>
|