PHP Classes

File: Example.php

Recommend this page to a friend!
  Classes of Atul Hansaliya   Simple Database Class   Example.php   Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: Simple Database Class
Execute MySQL queries from lists of parameters
Author: By
Last change:
Date: 16 years ago
Size: 845 bytes
 

Contents

Class file image Download
<?php ob_start();
/*

Developed by Atul Hansaliya
More details : http://www.beyondmart.com

*/

if(!isset($objb))
{
    include(
"myclass.php");
   
$objb= new mysqldb("connection.php");
}

// In following example you have to pass value as per argument

// Read value of one field
$str=$objb->GetValue("student","name","where id=10"); // will return string value

// Get Maximum value of given field
$str=$objb->GetMaxID("student","marks"); // will return string value

// Select query
$qry=$objb->selectquery("tablename","*","where id=2"); // will return records of mysql_query() function

// Insert query
$result=$objb->insertquery("student",$_POST); // will return true or false of query result

// Update query
$result=$objb->updatequery("student",$_POST); // will return true or false of query result



?>