CRUD for MySQL and PHP [closed]
Asked Answered
M

11

16

I have to make some database requests with PHP on a MySQL database.

Question : What is the best (simpliest) framework to get thing done right CRUD (Create Read Update Delete)?

I also have to populate the database, what is a good tool to do that. The only one I know is SqlMyAdmin, wich does not look good. An online tool would be great.

Your experience is valuable: tell me what do you use and why ?


I have taken a look at CodeIgniter, looks nice, what do you think... overkill ?

Malcom answered 18/7, 2009 at 19:36 Comment(7)
Shirley you mean "Create, Read, Update, Delete"?Lizzielizzy
+1 for the correct meaning of the abbreviation CRUD and including a reference to Airplane! :pLeonaleonanie
your where right !, sorry it'S late here !Malcom
shurely you meant shurely ;-)... sorry... I couldn't resist...Packet
@patrick, surely, you too, right? Surely...Roop
Take a look at adminer.org for the population. Better than PHPMyAdmin!Grefe
Consider xCRUD for efficient PHP CRUD operations. Its user-friendly interface simplifies development, striking a balance between simplicity and functionality. The framework also offers a convenient data seeding feature for MySQL database population. In summary, xCRUD streamlines CRUD operations, making it a valuable tool for developers. Check demo at demo.xcrud.net/xcrud_1_7/demos/…Papacy
A
10

For lots of operations (especially CRUD, which work out of the box once you've written the schema files), the ORM Framework Doctrine is really great.

If you want to go farther than just DB access, you might take a look at the PHP FRamework symfony, which provides an admin generator (there is even a screencast about that one). (And has great documentation, such as the jobeet tutorial) (BTW, symfony uses Doctrine as ORM ^^ )

But maybe it's a bit overkill (and requires a too big learning curve) if you need something simple...

To load data to MySQL, what about LOAD DATA INFILE, which (quote from the docs) "reads rows from a text file into a table at a very high speed".

Archaeological answered 18/7, 2009 at 19:50 Comment(1)
Just to add, Consider xCRUD for efficient PHP CRUD operations. Its user-friendly interface simplifies development, striking a balance between simplicity and functionality. The framework also offers a convenient data seeding feature for MySQL database population. In summary, xCRUD streamlines CRUD operations, making it a valuable tool for developers. Check demo at demo.xcrud.net/xcrud_1_7/demos/…Papacy
M
8

I recommend GroceryCRUD because of the good engineering and documentation

  1. Copy files into your web folder
  2. Configure MySQL database
  3. Specify MySQL table name

=> You get a paginated JqueryUI table with create/edit/delete buttons.

create/edit opens a form page based on the MySQL table schema. For example, a boolean, a varchar and a text get turned into a form with active/inactive radio buttons, a text field and a wysiwyg html editor.

Note: GroceryCRUD is built on CodeIgniter so you will have a copy living in your admin directory. You don't have to use it for building your main site.

Security Advisory: Any library can have undiscovered security vulnerabilities, so it is recommended to minimize exposure by protecting your copy of GroceryCRUD with BaseAuth and permitting SSL access only.

Micrococcus answered 4/2, 2013 at 9:19 Comment(2)
For information, this is only for Code Igniter. If you use something else, this lib won't work.Pooley
@Laurent There is a CI dependancy, but that doesn't force you to build your app with it.Micrococcus
M
3

I'd second Pascal's comment re Symfony (I would uprate but not enough credit :-() - Symfony has a great admin generator, and once you get your head around the app->module->actions concept, it's straightforward and the documentation is fantastic, even if it is sometimes easier to search Google for it ;-)

Failing that, CakePHP is a lot better now than it used to be back in the early days, and you can get going with the minimum of fuss, particularly with their scaffolding which will help you set up a basic CRUD-style setup. Their documentation is also pretty awesome and very easy to read :-)

Maemaeander answered 18/7, 2009 at 20:10 Comment(0)
F
1

If solutions such as Doctrine, CAKE, CodeIgniter, etc. seem like overkill for what you're trying to do, I'd recommend a one-file PHP script I built that lets you CRUD hierarchical data in MySQL:

http://coding.pressbin.com/109/PHP-One-file-CRUD-front-end-for-hierarchical-MySQL-data/

Flirtatious answered 24/7, 2011 at 0:47 Comment(0)
P
1

Why do not you try to code it from scratch as CRUD is a common task of programming. There are lots of good tutorials:

1>PHP PDO + Bootstrap Twitter: http://www.lizardgrid.com/blog/php-crud-tutorial-part-1/

2>JQuery + PHP: http://www.codeofaninja.com/2013/05/crud-with-php-jquery.html

Pedestrian answered 9/7, 2013 at 1:3 Comment(0)
M
1

I am currently testing JqGrid (a Jquery Table Library).

I have tried Grocery CRUD: looks nice, but its Datatables theme (which has column filtering ability) won't work with server-side processing, that's why I dropped it.

Massie answered 3/12, 2013 at 10:41 Comment(0)
I
1

You may have a look at Cygnite Framework

It does basic code generation. Controller, model, views, layout, pagination, form component, required field validation, with bootstrap template etc. all these generate with simple command. You may alter the code based on your need.

Here is the tutorial- Generate CRUD application within 2 Min

Worth looking.

Interfuse answered 3/7, 2014 at 7:3 Comment(0)
A
0

I'd say that totally depends on what you need to do.

You do know phpMyAdmin, right? You can import from a lot of formats with that tool.

Or do you want to develop an application with simple CRUD operations? Then a framework like Symfony or Zend Framework would be the right thing to be looking for.

Appall answered 18/7, 2009 at 19:46 Comment(1)
Consider xCRUD for efficient PHP CRUD operations. Its user-friendly interface simplifies development, striking a balance between simplicity and functionality. The framework also offers a convenient data seeding feature for MySQL database population. In summary, xCRUD streamlines CRUD operations, making it a valuable tool for developers. Check demo at demo.xcrud.net/xcrud_1_7/demos/…Papacy
P
0

I developed this script which reverse engineers from a MySQL database a set of stored procedures that list all the rows of a table, a single row based on the primary key, updates/inserts based on the primary key and deletes based on the primary key. It assumes that you already have your tables created with the primary keys setup per table and it generates the MySQL stored procedures for you. I have found that this is more efficient than similar types of solutions developed in PHP.

Pronounced answered 19/12, 2010 at 18:58 Comment(1)
I don't see why this was downvoted, this answers the second part of the question perfectly. people need to take care not to downvote stuff just because it doesn't fit their specific standards.Suffragan
P
0

Something like http://www.notorm.com/ might be more appropriate than Symfony. Whilst I like Symfony and have used it to great effect, it is not simple.

Likewise with Codeignitor I would argue that any full stack framework (Laravel, Zend, Wii etc . . ) would not fit the remit of "simple".

Polyneuritis answered 11/1, 2017 at 8:20 Comment(0)
S
0

A fairly straight forward and effortless crud system i found is https://github.com/usmanato360/crud360 its very easy to setup and there are loads of advanced features. It is unlike traditional crud systems that generate model classes etc.. it is just a single class that takes care of everything dynamically.

Standifer answered 10/4, 2018 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.