PHP Classes

RA PHP MySQL CRUD class: Manipulate data in MySQL database tables

Recommend this page to a friend!
  Info   View files Example   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 255 This week: 1All time: 7,853 This week: 560Up
Version License PHP version Categories
ra-server_classtable 1.0.1Freely Distributable7PHP 5, Databases
Description 

Author

This package can manipulate data in MySQL database tables.

It can connect to a given MySQL database server and performs several types of operations to manipulate records in a given database table. Currently it can:

- Check if the table exists
- Retrieve the record data in the whole table with support to limit the number of records that are retrieved and sort in ascending or descending order
- Get the count of rows and columns in the table
- Get one record with a given id value
- Get the values of a column of the table
- Get the names of the table column
- Insert a record into the table
- Delete one record from table
- Query the table with a given condition
- Update a record of the table

Picture of Rafal Antczak
  Performance   Level  
Name: Rafal Antczak <contact>
Classes: 2 packages by
Country: Poland Poland
Age: ???
All time rank: 390485 in Poland Poland
Week rank: 416 Up12 in Poland Poland Up

Example

<?php
/*
 * Example - get records from table
 */


// Include Table class

   
require_once 'class.table.php';

   
/*
 * Init new Table object with database parameters specified in db_params.php
 * In this example the name of your table is 'table1'
 */
   
   
$some_table = new Table('table1');

   
   
$my_data = $some_table ->getTable();
   
   
    if (
$my_data !== FALSE) {
       
       
var_dump($my_data);
       
    }


?>


Details

Class Table, typical CRUD class which allows add, edit, read and delete records/fields/tables of any MySQL database 2019, ra-server.pl Licence: free to use and edit Run index.php first and follow the instruction Replace database connection parameters in db_params.php

  Files folder image Files  
File Role Description
Plain text file class.table.php Class Class source
Accessible without login Plain text file db_params.php Aux. Auxiliary script
Accessible without login Plain text file example_add_record.php Example Example script
Accessible without login Plain text file example_delete_record.php Example Example script
Accessible without login Plain text file example_get_column.php Example Example script
Accessible without login Plain text file example_get_row.php Example Example script
Accessible without login Plain text file example_get_table.php Example Example script
Accessible without login Plain text file example_get_table_fields.php Example Example script
Accessible without login Plain text file example_get_table_info.php Example Example script
Accessible without login Plain text file example_get_table_with_limit.php Example Example script
Accessible without login Plain text file example_get_table_with_query.php Example Example script
Accessible without login Plain text file example_update_record.php Example Example script
Accessible without login Plain text file index.php Aux. Auxiliary script
Accessible without login Plain text file readme.txt Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:255
This week:1
All time:7,853
This week:560Up