PHP Classes

Simple PHP Database Manager: Build and run SQL queries with a fluent interface

Recommend this page to a friend!
  Info   View files Example   View files View files (68)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-06-15 (Yesterday) RSS 2.0 feedStarStarStar 51%Total: 399 This week: 2All time: 6,573 This week: 35Up
Version License PHP version Categories
db-manager 1.17GNU General Publi...5.3PHP 5, Databases
Description 

Author

This class can build and run MySQL queries with a fluent interface.

It can compose SQL SELECT, INSERT, UPDATE and DELETE queries with a fluent interface of functions to define several parameters of the queries.

The functions can define the table fields, field values, query conditions, etc..

Picture of Vagner vinicius bispo cantuares
  Performance   Level  
Name: Vagner vinicius bispo ... <contact>
Classes: 2 packages by
Country: Portugal Portugal

Example

<?php
require_once 'db_manager.php';

$db = DB_Manager::get_instance();
$db->database();

$db->table = 'users';

# all results.
$result = $db->select('*')->getAll();
echo
'<pre>';
   
var_export($result);
echo
'</pre>';

# one result.
$result = $db->select('*')->where('username', 'cantuares')->get();
echo
'<pre>';
   
var_export($result);
echo
'</pre>';

# insert record.
$result = $db->values(array('username' => 'fulano', 'password' => '***'))->insert();
echo
'<pre>';
   
var_export($result);
echo
'</pre>';

# update record.
$result = $db->set(array('username' => 'sicrano'))->where('username', 'fulano')->update();
echo
'<pre>';
   
var_export($result);
echo
'</pre>';

# delete record.
$result = $db->where('username', 'sicrano')->delete();
echo
'<pre>';
   
var_export($result);
echo
'</pre>';

?>


Details

PHP Database Manager

Small and simple class for MySQL database management.


  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagedocs (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Plain text file db_manager.php Class Class source
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file example_sql.sql Data Auxiliary data
Accessible without login Plain text file LICENSE Data Auxiliary data
Accessible without login Plain text file README.md Doc. Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file database.php Conf. Configuration script

  Files folder image Files  /  docs  
File Role Description
Files folder imageapi (2 files, 11 directories)

  Files folder image Files  /  docs  /  api  
File Role Description
Files folder imageclasses (1 file)
Files folder imagecss (5 files, 1 directory)
Files folder imagefiles (2 files)
Files folder imagefont (5 files)
Files folder imagegraphs (1 file)
Files folder imageimages (12 files, 1 directory)
Files folder imagejs (10 files, 1 directory)
Files folder imagenamespaces (1 file)
Files folder imagephpdoc-cache-2e (1 file)
Files folder imagephpdoc-cache-ee (1 file)
Files folder imagereports (3 files)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files  /  docs  /  api  /  classes  
File Role Description
  Accessible without login HTML file DB_Manager.html Doc. Documentation

  Files folder image Files  /  docs  /  api  /  css  
File Role Description
Files folder imagephpdocumentor-clean-icons (3 files, 1 directory)
  Accessible without login Plain text file bootstrap-combined.no-icons.min.css Data Auxiliary data
  Accessible without login Plain text file font-awesome.min.css Data Auxiliary data
  Accessible without login Plain text file jquery.iviewer.css Data Auxiliary data
  Accessible without login Plain text file prism.css Data Auxiliary data
  Accessible without login Plain text file template.css Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  css  /  phpdocumentor-clean-icons  
File Role Description
Files folder imagefonts (5 files)
  Accessible without login Plain text file lte-ie7.js Data Auxiliary data
  Accessible without login Plain text file Read Me.txt Doc. Documentation
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  css  /  phpdocumentor-clean-icons  /  fonts  
File Role Description
  Accessible without login Plain text file phpdocumentor-clean-icons.dev.svg Data Auxiliary data
  Accessible without login Plain text file phpdocumentor-clean-icons.eot Data Auxiliary data
  Accessible without login Plain text file phpdocumentor-clean-icons.svg Data Auxiliary data
  Accessible without login Plain text file phpdocumentor-clean-icons.ttf Data Auxiliary data
  Accessible without login Plain text file phpdocumentor-clean-icons.woff Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  files  
File Role Description
  Accessible without login HTML file db_manager.html Doc. Documentation
  Accessible without login Plain text file db_manager.php.txt Doc. Documentation

  Files folder image Files  /  docs  /  api  /  font  
File Role Description
  Accessible without login Plain text file fontawesome-webfont.eot Data Auxiliary data
  Accessible without login Plain text file fontawesome-webfont.svg Data Auxiliary data
  Accessible without login Plain text file fontawesome-webfont.ttf Data Auxiliary data
  Accessible without login Plain text file fontawesome-webfont.woff Data Auxiliary data
  Accessible without login Plain text file FontAwesome.otf Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  graphs  
File Role Description
  Accessible without login HTML file class.html Doc. Documentation

  Files folder image Files  /  docs  /  api  /  images  
File Role Description
Files folder imageiviewer (8 files)
  Accessible without login Image file apple-touch-icon-114x114.png Icon Icon image
  Accessible without login Image file apple-touch-icon-72x72.png Icon Icon image
  Accessible without login Image file apple-touch-icon.png Icon Icon image
  Accessible without login Plain text file custom-icons.svg Data Auxiliary data
  Accessible without login Image file favicon.ico Data Auxiliary data
  Accessible without login Image file hierarchy-item.png Icon Icon image
  Accessible without login Image file icon-class-13x13.png Icon Icon image
  Accessible without login Plain text file icon-class.svg Data Auxiliary data
  Accessible without login Image file icon-interface-13x13.png Icon Icon image
  Accessible without login Plain text file icon-interface.svg Data Auxiliary data
  Accessible without login Image file icon-trait-13x13.png Icon Icon image
  Accessible without login Plain text file icon-trait.svg Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  images  /  iviewer  
File Role Description
  Accessible without login Image file grab.cur Data Auxiliary data
  Accessible without login Image file hand.cur Data Auxiliary data
  Accessible without login Image file iviewer.rotate_left.png Icon Icon image
  Accessible without login Image file iviewer.rotate_right.png Icon Icon image
  Accessible without login Image file iviewer.zoom_fit.png Icon Icon image
  Accessible without login Image file iviewer.zoom_in.png Icon Icon image
  Accessible without login Image file iviewer.zoom_out.png Icon Icon image
  Accessible without login Image file iviewer.zoom_zero.png Icon Icon image

  Files folder image Files  /  docs  /  api  /  js  
File Role Description
Files folder imageui (1 directory)
  Accessible without login Plain text file bootstrap.min.js Data Auxiliary data
  Accessible without login Plain text file html5.js Data Auxiliary data
  Accessible without login Plain text file jquery-1.11.0.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.dotdotdot-1.5.9.js Data Auxiliary data
  Accessible without login Plain text file jquery.dotdotdot-1.5.9.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.iviewer.js Data Auxiliary data
  Accessible without login Plain text file jquery.iviewer.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.mousewheel.js Data Auxiliary data
  Accessible without login Plain text file jquery.smooth-scroll.js Data Auxiliary data
  Accessible without login Plain text file prism.min.js Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  js  /  ui  
File Role Description
Files folder image1.10.4 (1 file)

  Files folder image Files  /  docs  /  api  /  js  /  ui  /  1.10.4  
File Role Description
  Accessible without login Plain text file jquery-ui.min.js Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  namespaces  
File Role Description
  Accessible without login HTML file default.html Doc. Documentation

  Files folder image Files  /  docs  /  api  /  phpdoc-cache-2e  
File Role Description
  Accessible without login Plain text file phpdoc-cache-settings.dat Data Auxiliary data

  Files folder image Files  /  docs  /  api  /  phpdoc-cache-ee  
File Role Description
  Plain text file phpdoc-cache-file_...1c6f92a004f629a.dat Class Class source

  Files folder image Files  /  docs  /  api  /  reports  
File Role Description
  Accessible without login HTML file deprecated.html Doc. Documentation
  Accessible without login HTML file errors.html Doc. Documentation
  Accessible without login HTML file markers.html Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:399
This week:2
All time:6,573
This week:35Up
 User Ratings  
 
 All time
Utility:62%StarStarStarStar
Consistency:68%StarStarStarStar
Documentation:68%StarStarStarStar
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:2474