PHP Classes

PHP MySQLi Queries: Simple MySQLi wrapper to execute common 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
StarStarStar 40%Total: 452 This week: 1All time: 6,162 This week: 560Up
Version License PHP version Categories
php-mysqli-queries 1.0.0Freely Distributable5PHP 5, Databases
Description 

Author

This class is a very simple MySQLi wrapper to execute common queries.

It extends the MySQLi class to add functions to execute SQL SELECT, INSERT, UPDATE, and DELETE queries.

Applications can use other MySQLi class functions to access the query result sets.

Picture of Fortune James
  Performance   Level  
Name: Fortune James <contact>
Classes: 4 packages by
Country: Nigeria Nigeria
Age: 37
All time rank: 227811 in Nigeria Nigeria
Week rank: 51 Up5 in Nigeria Nigeria Up

Example

<?php
   
   
/*
    This is an example script to execute queries
    */
   
    // Establish Connection and requirements
   
require 'dbclass.php';
   
   
$conn= new myDB();
   
   
//Select Example
   
$sql="SELECT * FROM `mytable`";
   
$run=$conn->getData($sql);
   
$row=$run->fetch_object();
   
$fullname=$row->fullname;
   
    echo
$fullname;
   
   
//Insert Example
   
$sql="INSERT INTO `mytable` (id, fullname) VALUES(1, 'xxx')";
   
$run=$conn->setData($sql);
   
   
//Update Example
   
$sql="UPDATE `mytable` SET fullname='xxx' WHERE id=1";
   
$run=$conn->upData($sql);
   
   
//Delete Example
   
$sql="DELETE FROM `mytable` WHERE id=1";
   
$run=$conn->remData($sql);
   
?>

   
   
   
   
   
   


  Files folder image Files  
File Role Description
Plain text file dbclass.php Class PHP Class File
Plain text file example.php Example PHP Queries Examples

 Version Control Unique User Downloads Download Rankings  
 0%
Total:452
This week:1
All time:6,162
This week:560Up
 User Ratings  
 
 All time
Utility:58%StarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:40%StarStarStar
Rank:3710