PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of majid ramzani  >  DB MySQL Class  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: DB MySQL Class
Connect and query MySQL databases
Author: By
Last change:
Date: 5 years ago
Size: 1,043 bytes


Class file image Download


   Projectname: Mysql DataBase Class
   Version: 1.00
   site :

   Last modified: 14. April 2012

   * GNU General Public License (Version 2, June 1991)
   * This program is free software; you can redistribute
   * it and/or modify it under the terms of the GNU
   * General Public License as published by the Free
   * Software Foundation; either version 2 of the License,
   * or (at your option) any later version.
   email :

 // include class :
require_once "db.class.php";

//creat a db object
$con=new db;

//run the query:
$con->query("select * from table ");

//get number of result
echo $con->num() . PHP_EOL;

//get result
echo $con->result(/* $index */) . PHP_EOL;

//get all result
while($row=$con->assoc()) var_dump($row);