Wallogit.com
2017 © Pedro Peláez
A Simple CRUD Class to make your development process faster
A Simple Create,Read,Update,Delete Library for your PHP Web App. Basically, there wouldn't be any need to tinker with annoying Query Codes. Leverages Both MYSQLi and PDO., (*1)
First install Composer using, (*2)
composer install, (*3)
Then Require it using, (*4)
composer require scrud/scrud, (*5)
Which will then be added to your Composer.json dependencies., (*6)
Or, (*7)
git clone https://github.com/kofacts/Simple_CRUD.git", (*8)
Open the File, (*9)
Locate the src/ directory and Open the config.php, (*10)
Fill in the necessary details and DB_Type. MYSQLI or PDO., (*11)
$connectDetails=[
"hostname"=>"hostname",
"username"=>"username",
"password"=>"password",
"DB_NAME"=>"database name",
"connect_type"=>strtoupper("pdo or mysqli"),
];
, (*12)
$scrud= new Scrud;, (*13)
$scrud->create("user_details",array("username"=>"Ricesss","password"=>"pico4421ss")); , (*14)
$posts=$scrud->get("user_details");, (*15)
And then loop through all the fields., (*16)
foreach($posts as $row)
{
echo $row['username'];
}
, (*17)
$value=$scrud->get_where($tablename,$id,$value)
And then use, (*18)
echo $value['username'];, (*19)
$scrud->update("user_details",array("username"=>"Rapheal","password"=>"skjf..anything"),"id",1);, (*20)
$scrud->delete("user_details","id",2);, (*21)
The Concept is inspired by Codeigniter's Sleek Query System. Make it simple, and very simple has always been the name., (*22)
There are so many features that should be added to this platform. Hey, Don't just leave, you can always contribute by pulling a request., (*23)
Nah, Nada, Don't thank Me. Actually, you can thank me by Staring. Em, :smile: I think that is just it., (*24)
PS: Some Basic Touches still going on., (*25)
MIT, (*26)