开发者

PHP database framework (easy insert, edit, search...)? Something like phpMyAdmin

开发者 https://www.devze.com 2022-12-21 00:56 出处:网络
I\'m trying to find some kind of PHP framework that allows me to do some \"database oriented programming\". I mean something like Clipper and MS Access (I never used them, just heard about, so I might

I'm trying to find some kind of PHP framework that allows me to do some "database oriented programming". I mean something like Clipper and MS Access (I never used them, just heard about, so I might be a bit off).

Basically, the idea is that I create a database with a table "c开发者_开发技巧ustomers", for instance, containing ID, Name, Address and Telephone. Then the framework would connect to this database and easily allow me to create a form with (some of) those fields, set which ones should be searchable (using AJAX? :)) and so on. That would take my job of doing the database insert/edit/listing/search functions, just leaving me with the relationship of the tables (maybe it can understand foreing keys for some other cool features) and logic.

I don't know if I'm asking too much, but I don't think that's very specific (ie, many programmers would like to start with something like that). It's something similar to what phpMyAdmin, but it would be to the end-user, not to the admin.

Thanks


You may try Medoo. It`s very easy to use and learn, and importantly it is super-lightweight with only around 100KB only.

  • Less than 100 KB, portable with only one file
  • Extremely easy to learn and use, friendly construction
  • Supports various common and complex SQL queries, data mapping, and prevent SQL injection
  • Supports all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle and more
  • Works well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension or composer
  • Free Under MIT license


I know the symfony framework provides an "Admin generator", that generates some stuff like this -- not sure how close it is to what you're asking (it'll probably not do everything you need), but it might be a start.

For more informations, you can take a look at, for instance, day 12 of the jobeet tutorial.


You could look into something like Cake, or CodeIgniter both of which do much of the tedious work for you.


The ezSQL library is also an option.

The WordPress wpdb class is a forked version of an early version of ezSQL.


The closest frameworks to want you require are Symfony, Yii & CakePHP, they all have a console (command line) tool so quickly generte basic crud for them (symfony probably has the most complete functionity with it's admin generator, but also as a steeper learning curve than the other two)


In some projects I have succesfully used MySQL Ajax Table Editor (MATE) http://www.mysqlajaxtableeditor.com/

It has it's limitations, but you do get all basic data management operations for an SQL table quick and easy by writing just one configuration file.

I think this is best suited for admin interfaces, I would not use MATE for open-to-whole-internet type of pages.


you can use yii curd generator (3rd video here here) for this , very easy to use and implement. if you like to know latest php frameworks check this out http://codepappa.com/php-frameworks/


Try this MWEB Database API my own made PHP Database API

0

精彩评论

暂无评论...
验证码 换一张
取 消