Forum Moderators: open

Message Too Old, No Replies

Database CRUD or Scaffolding generators

         

keym

6:31 pm on Nov 9, 2006 (gmt 0)

10+ Year Member



Hi,

Given a MySQL table, I need a way to automatically generate a simple page or PHP app which gives the user the ability to:

- List/Print the table contents, and
- View/Edit/Delete/Add/Search records in/into the table.

Sometimes this is called scaffolding, or CRUD.

Anyone know the best PHP tool for this?

stajer

8:20 pm on Nov 9, 2006 (gmt 0)

10+ Year Member



it is not php, but check out ruby on rails. it developed around this exact idea.

physics

12:35 am on Nov 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check out phpMyAdmin:
[phpmyadmin.net...]

keym

8:10 am on Nov 10, 2006 (gmt 0)

10+ Year Member



Thanks for the input.

PhpMyAdmin is great for me, I love it and use it all the time. But, it is not something I want to give an end user.

I'm looking a simple and quick solution to allow an end user to manage data in some tables I've provided him.

Thanks for the Ruby on Rails suggestion, but looking for php. I know cakePHP and code ignitor have something like this, so that might be possible, but then need to bring in the whole framework.

Basically looking for a "geared for an end-user" kind of phpmyadmin, I guess.

Even better if it exists, would be some kind of CRM where one can manage several different configurable entities (eg. customers, products, suppliers). Each table would be one of those entities.

All the indexing/searching/editing/printing/listing/deleting would then come for free. The bonus would be relationships between the tables.

So, anyone perhaps know of a generic CRM or entity relationship manager which can run off tables you configure (now I'm really getting idealistic)!?

baxuyen

7:23 pm on Nov 10, 2006 (gmt 0)

10+ Year Member



Phpmyadmin is a content management graphic control interface for MySQL.

Since you're already using MySQL as your database. What you need is to build a content management for the site.

We(Webmaster) do it all the time. We would build the site with the content control that allow the management of the company to upload data, image, text, and etc.. to the website. They would only have to call us when something serious happen to the site.

What? You think we would sit there and upload every single article to a site after we built it. At 50+ an hour. No company could afford to paid us.

jtara

8:26 pm on Nov 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So, anyone perhaps know of a generic CRM or entity relationship manager which can run off tables you configure

Echo previous response... Ruby on Rails, "Active Record" + "Action View"

But... see my post elsewhere... ROR is not ready for prime time for most users.

Active Record is a generic design pattern. It's been implemented in other languages and frameworks. So, do a search on "Active Record PHP" for packages that implement this.

In the nutshell, the basic idea behind Active Record is "Here is a database. Automagically make me convenient classes allowing me to access this database."

The ROR implement sure is slick, though. Feast your eyes on this and drool. A complete program to change the purchaser's name on an order in a database follows. This is all the code that needs to be written to do this. There's no "generator" to run. All the mapping is done on-the-fly from the database schema.

require "rubygems"
require_gem "activerecord"

ActiveRecord::Base.establish_connection(:adapter => "mysql" ,
:host => "localhost" , :database => "railsdb" )

class Order < ActiveRecord::Base
end

order = Order.find(123)
order.name = "Dave Thomas"
order.save