PHP Classes

PHP CRUD generator: Generate classes to manipulate MySQL table records

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 42%Total: 1,343 All time: 2,885 This week: 34Up
Version License PHP version Categories
crud 1.0.3GNU General Publi...5PHP 5, Databases, Code Generation
Description 

Author

This class can generate classes to manipulate MySQL table records.

It takes the name of a given MySQL database table and generates code for classes to create, list, update and delete records of that table.

The class also generates scripts to perform each of those database table records operations.

Picture of Frank Cauley
  Performance   Level  
Name: Frank Cauley <contact>
Classes: 2 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Recommendations

How to manage instutional repository in MySQL database
Manage institutional repository application

Example

<?php


require_once("Class_crud.php");
$crud = new crud;
$crud->setTable($_GET['table']);
$crud->loadCrudArrays();
if (
is-dir($_SERVER['DOCUMENT_ROOT']. "/crud/" .$_GET['table']))
{
    echo
" The directory for " . $_GET['table'] . " is already established.";
}else
{
    @
mkdir($_SERVER['DOCUMENT_ROOT'] . "/crud/" . $_GET['table']);
}

$crud->generateClass();
$crud->generateListPhp();
$crud->generateCreatePhp();
$crud->generateUpdatePhp();
$crud->generateDeletePhp();
echo
"crud generated";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Generate Crud Sql and forms</title>
</head>

<body>
</body>
</html>


Details

System Overview

When developing internet applications, a lot of time is spent maintaining the various MySql database tables. Gray and White wrote this CRUD system about three yeas ago and it has been helpful in many applications.

While developing the Virtual Cash Register system the Jtable Crud system was cloned from Github. That system had many features, including an attractive interface, that the Graynwhite system did not have . Conversely the Graynwhite crud system did generate the four crud files namely: Create, Retreive,Update and Delete.

Private settings

A file entitled crudPrivateSettings.php must be created with the following entries:

  • $this->companyName = "Your Company name ";
  • $this->dbname="the db name you are using";
  • $this->mysqlServer = "The server";
  • $this->mysqlUserName = "usernam";
  • $this->mysqlPassword = "password";
  • $this->mysqlDatabase = "data base name";

  Files folder image Files (16)  
File Role Description
Accessible without login Image file checkMark.jpg Icon Icon image
Accessible without login Plain text file Class_.php Output Class source
Plain text file Class_crud.php Class Class source
Accessible without login Image file companylogo.jpg Icon Icon image
Accessible without login Plain text file create.php Output Auxiliary script
Accessible without login Plain text file delete.php Output Auxiliary script
Accessible without login Image file deleteMark.jpg Icon Icon image
Accessible without login Plain text file generateCrud.php Example Auxiliary script
Accessible without login Plain text file index.php Output Auxiliary script
Accessible without login Plain text file license.txt Doc. Documentation
Accessible without login Plain text file readme.md Doc. Auxiliary data
Accessible without login Image file sortAscending.jpg Icon Icon image
Accessible without login Image file sortDecending.jpg Icon Icon image
Accessible without login Image file sortDescending.jpg Icon Icon image
Accessible without login Image file sortMark.jpg Icon Icon image
Accessible without login Plain text file update.php Output Auxiliary script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,343
This week:0
All time:2,885
This week:34Up
User Ratings User Comments (4)
 All time
Utility:50%StarStarStar
Consistency:57%StarStarStar
Documentation:57%StarStarStar
Examples:64%StarStarStarStar
Tests:-
Videos:-
Overall:42%StarStarStar
Rank:3628
 
Noes not use bind parameters.
11 years ago (per)
35%StarStar
good
11 years ago (Rahul Shambharkar)
80%StarStarStarStarStar
not sure why people publish this kind of useless stuff how is...
11 years ago (Frank DeCicco)
0%Star
this package does not provide example scripts that demonstrat...
11 years ago (BIll Ebert)
20%StarStar