Converting tables into forms

Converting tables into forms

am 28.10.2009 02:12:08 von Ben C

Does anyone have a quick way of converting tables into forms?

--
************************************************************ **********
The content of this e-mail message and any attachments are
confidential and may be legally privileged, intended solely for the
addressee. If you are not the intended recipient, be advised that any
use, dissemination, distribution, or copying of this e-mail is
strictly prohibited. If you receive this message in error, please
notify the sender immediately by reply email and destroy the message
and its attachments.
************************************************************ *********

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Converting tables into forms

am 28.10.2009 02:48:12 von Robert Cummings

benc11@gmail.com wrote:
> Does anyone have a quick way of converting tables into forms?

*tongue in cheek*

PHPMyAdmin.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Converting tables into forms

am 28.10.2009 03:01:02 von chetan rane

--00504502cbf4bd51aa0476f52abf
Content-Type: text/plain; charset=ISO-8859-1

Hi Ben

The quickest way to this is by using a framework.
and the best way i could find was using the yiiframework
www.yiiframework.com

i could create a basic form with validations in less then 15 minutes.

On Wed, Oct 28, 2009 at 6:42 AM, benc11@gmail.com wrote:

> Does anyone have a quick way of converting tables into forms?
>
> --
> ************************************************************ **********
> The content of this e-mail message and any attachments are
> confidential and may be legally privileged, intended solely for the
> addressee. If you are not the intended recipient, be advised that any
> use, dissemination, distribution, or copying of this e-mail is
> strictly prohibited. If you receive this message in error, please
> notify the sender immediately by reply email and destroy the message
> and its attachments.
> ************************************************************ *********
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
with regards,

Chetan Dattaram Rane
Mob : +91 9766646714
Phone: 0831-2462055

--00504502cbf4bd51aa0476f52abf--

Re: Converting tables into forms

am 28.10.2009 05:07:27 von Ben C

I am trying to take MySQL tables and use the table structure to create
HTML/PHP forms in as few steps as possible for further development. I
have a project that has hundreds of tables and requires hundreds of
forms to be created and don't want to do so field by field by hand.

Thanks,

Ben

On Tuesday, October 27, 2009, Allen McCabe wrote:
> Please explain with much greater detail.
>
> On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com wrote:
> Does anyone have a quick way of converting tables into forms?
>
> --
> ************************************************************ **********
> The content of this e-mail message and any attachments are
> confidential and may be legally privileged, intended solely for the
> addressee. If you are not the intended recipient, be advised that any
> use, dissemination, distribution, or copying of this e-mail is
> strictly prohibited. If you receive this message in error, please
> notify the sender immediately by reply email and destroy the message
> and its attachments.
> ************************************************************ *********
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--
************************************************************ **********
The content of this e-mail message and any attachments are
confidential and may be legally privileged, intended solely for the
addressee. If you are not the intended recipient, be advised that any
use, dissemination, distribution, or copying of this e-mail is
strictly prohibited. If you receive this message in error, please
notify the sender immediately by reply email and destroy the message
and its attachments.
************************************************************ *********

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 28.10.2009 05:18:32 von James Mclean

On Wed, Oct 28, 2009 at 2:37 PM, benc11@gmail.com wrote:
> I am trying to take MySQL tables and use the table structure to create
> HTML/PHP forms in as few steps as possible for further development. I
> have a project that has hundreds of tables and requires hundreds of
> forms to be created and don't want to do so field by field by hand.

With a little coding, Zend_Form should do what you need.

http://framework.zend.com/manual/en/zend.form.html

Cheers,

James

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 28.10.2009 06:04:48 von Robert Cummings

benc11@gmail.com wrote:
> I am trying to take MySQL tables and use the table structure to create
> HTML/PHP forms in as few steps as possible for further development. I
> have a project that has hundreds of tables and requires hundreds of
> forms to be created and don't want to do so field by field by hand.

With hundreds of tables, if you don't find an existing solution that
meets your needs, it sounds like it would be a good idea to design your
own anyways.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Converting tables into forms

am 28.10.2009 10:15:26 von Tony Marston

Try the Radicore framework at http://www.radicore.org This will allow you to
import your table definitions into its Data Dictionary, export those
definitions to produce table classes, then you can generate the basic
maintenance tasks using transaction patterns. This takes 5 minutes per
table, and you don't have to write any code - no PHP, no HTML, no SQL. You
even get an RBAC system so that you can run the transactions of a menu, and
decide which users have access to which tasks. There is also an inbuilt
Audit Logging system (which does not use database triggers) and a Workflow
engine.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

"chetan rane" wrote in message
news:248b70ae0910271901o6ffd569dl203c9a08bfe8a9dd@mail.gmail .com...
> Hi Ben
>
> The quickest way to this is by using a framework.
> and the best way i could find was using the yiiframework
> www.yiiframework.com
>
> i could create a basic form with validations in less then 15 minutes.
>
> On Wed, Oct 28, 2009 at 6:42 AM, benc11@gmail.com
> wrote:
>
>> Does anyone have a quick way of converting tables into forms?
>>
>> --
>> ************************************************************ **********
>> The content of this e-mail message and any attachments are
>> confidential and may be legally privileged, intended solely for the
>> addressee. If you are not the intended recipient, be advised that any
>> use, dissemination, distribution, or copying of this e-mail is
>> strictly prohibited. If you receive this message in error, please
>> notify the sender immediately by reply email and destroy the message
>> and its attachments.
>> ************************************************************ *********
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> with regards,
>
> Chetan Dattaram Rane
> Mob : +91 9766646714
> Phone: 0831-2462055
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 28.10.2009 11:21:56 von Ashley Sheridan

--=-k20pZRaNh4zM6vADP13W
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2009-10-27 at 21:07 -0700, benc11@gmail.com wrote:

> I am trying to take MySQL tables and use the table structure to create
> HTML/PHP forms in as few steps as possible for further development. I
> have a project that has hundreds of tables and requires hundreds of
> forms to be created and don't want to do so field by field by hand.
>
> Thanks,
>
> Ben
>
> On Tuesday, October 27, 2009, Allen McCabe wrote:
> > Please explain with much greater detail.
> >
> > On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com wrote:
> > Does anyone have a quick way of converting tables into forms?
> >
> > --
> > ************************************************************ **********
> > The content of this e-mail message and any attachments are
> > confidential and may be legally privileged, intended solely for the
> > addressee. If you are not the intended recipient, be advised that any
> > use, dissemination, distribution, or copying of this e-mail is
> > strictly prohibited. If you receive this message in error, please
> > notify the sender immediately by reply email and destroy the message
> > and its attachments.
> > ************************************************************ *********
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
> --
> ************************************************************ **********
> The content of this e-mail message and any attachments are
> confidential and may be legally privileged, intended solely for the
> addressee. If you are not the intended recipient, be advised that any
> use, dissemination, distribution, or copying of this e-mail is
> strictly prohibited. If you receive this message in error, please
> notify the sender immediately by reply email and destroy the message
> and its attachments.
> ************************************************************ *********
>


There is still the issue of exactly what db fields will translate into.
Where is a good time to use radio buttons instead of select lists, or
checkboxes instead of select-multiple lists? What about text fields in
the db? Should they be textareas or text inputs? Do all the db fields
need to be translated as visible fields? Should you hide ID fields?

There are so many questions, that you might be better off rolling your
own, as a one-size-fits-all will not always work for everyone.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-k20pZRaNh4zM6vADP13W--

Re: Converting tables into forms

am 28.10.2009 13:40:52 von Shawn McKenzie

benc11@gmail.com wrote:
> I am trying to take MySQL tables and use the table structure to create
> HTML/PHP forms in as few steps as possible for further development. I
> have a project that has hundreds of tables and requires hundreds of
> forms to be created and don't want to do so field by field by hand.
>
> Thanks,
>
> Ben
>
> On Tuesday, October 27, 2009, Allen McCabe wrote:
>> Please explain with much greater detail.
>>
>> On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com wrote:
>> Does anyone have a quick way of converting tables into forms?

Use the CakePHP framework. Run a script, type in your database info and
it will scan all your tables and generate the forms and the list,
update, delete code for each table. It should be fully functional then
and you can tweak to your needs to add table relations etc.


--
Thanks!
-Shawn
http://www.spidean.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Converting tables into forms

am 28.10.2009 13:53:55 von Bob McConnell

From: Ashley Sheridan

> On Tue, 2009-10-27 at 21:07 -0700, benc11@gmail.com wrote:
>=20
>> I am trying to take MySQL tables and use the table structure to
create
>> HTML/PHP forms in as few steps as possible for further development. I
>> have a project that has hundreds of tables and requires hundreds of
>> forms to be created and don't want to do so field by field by hand.
>>=20
>> On Tuesday, October 27, 2009, Allen McCabe
wrote:
>> > Please explain with much greater detail.
>> >
>> > On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com
wrote:
>> > Does anyone have a quick way of converting tables into forms?
>> >
>=20
> There is still the issue of exactly what db fields will translate
into.
> Where is a good time to use radio buttons instead of select lists, or
> checkboxes instead of select-multiple lists? What about text fields in
> the db? Should they be textareas or text inputs? Do all the db fields
> need to be translated as visible fields? Should you hide ID fields?
>=20
> There are so many questions, that you might be better off rolling your
> own, as a one-size-fits-all will not always work for everyone.

I have a feeling in the pit of my stomach that your project is going to
create a support nightmare. Either you will have to hand code forms for
each table, or find a framework that dynamically creates the forms from
schema and create suitable maps for each form. In either case, it will
take weeks or months to complete and be nearly impossible to maintain
when tables are changed or added.

If your solution requires you to create hundreds of forms, which could
take months to code, you need to take another look at the problem. I
don't believe you have thought it through very well.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 28.10.2009 14:19:43 von Phpster

On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell wrote:
> From: Ashley Sheridan
>
>> On Tue, 2009-10-27 at 21:07 -0700, benc11@gmail.com wrote:
>>
>>> I am trying to take MySQL tables and use the table structure to
> create
>>> HTML/PHP forms in as few steps as possible for further development. I
>>> have a project that has hundreds of tables and requires hundreds of
>>> forms to be created and don't want to do so field by field by hand.
>>>
>>> On Tuesday, October 27, 2009, Allen McCabe
> wrote:
>>> > Please explain with much greater detail.
>>> >
>>> > On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com
> wrote:
>>> > Does anyone have a quick way of converting tables into forms?
>>> >
>>
>> There is still the issue of exactly what db fields will translate
> into.
>> Where is a good time to use radio buttons instead of select lists, or
>> checkboxes instead of select-multiple lists? What about text fields in
>> the db? Should they be textareas or text inputs? Do all the db fields
>> need to be translated as visible fields? Should you hide ID fields?
>>
>> There are so many questions, that you might be better off rolling your
>> own, as a one-size-fits-all will not always work for everyone.
>
> I have a feeling in the pit of my stomach that your project is going to
> create a support nightmare. Either you will have to hand code forms for
> each table, or find a framework that dynamically creates the forms from
> schema and create suitable maps for each form. In either case, it will
> take weeks or months to complete and be nearly impossible to maintain
> when tables are changed or added.
>
> If your solution requires you to create hundreds of forms, which could
> take months to code, you need to take another look at the problem. I
> don't believe you have thought it through very well.
>
> Bob McConnell
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

symfony might be another option, but it will take you some time to
sort out the yaml config.


--

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Converting tables into forms

am 28.10.2009 17:17:33 von Jay Blanchard

[snip]If your solution requires you to create hundreds of forms, which
could
take months to code, you need to take another look at the problem. I
don't believe you have thought it through very well.[/snip]

Actually you could use the function I provided to do this on the fly or
have the function write out a file for each table involved.=20

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 28.10.2009 18:18:16 von Ben C

--001636e9087b2f4573047701fcc4
Content-Type: text/plain; charset=ISO-8859-1

Jay,

What function do you have? Thanks to everyone for their feedback.

Best,

Ben

On Wed, Oct 28, 2009 at 9:17 AM, Jay Blanchard wrote:

> [snip]If your solution requires you to create hundreds of forms, which
> could
> take months to code, you need to take another look at the problem. I
> don't believe you have thought it through very well.[/snip]
>
> Actually you could use the function I provided to do this on the fly or
> have the function write out a file for each table involved.
>

--001636e9087b2f4573047701fcc4--

Re: Re: Converting tables into forms

am 29.10.2009 12:17:04 von Tom Barrett

--00504502d2b4162f1b0477110dee
Content-Type: text/plain; charset=ISO-8859-1

Apologies for semi-hijacking, but I am confused.

What are aiming to do that something like PHPMyAdmin doesn't do?

2009/10/28 benc11@gmail.com

> Jay,
>
> What function do you have? Thanks to everyone for their feedback.
>
> Best,
>
> Ben
>
> On Wed, Oct 28, 2009 at 9:17 AM, Jay Blanchard > >wrote:
>
> > [snip]If your solution requires you to create hundreds of forms, which
> > could
> > take months to code, you need to take another look at the problem. I
> > don't believe you have thought it through very well.[/snip]
> >
> > Actually you could use the function I provided to do this on the fly or
> > have the function write out a file for each table involved.
> >
>

--00504502d2b4162f1b0477110dee--

RE: Re: Converting tables into forms

am 29.10.2009 13:19:19 von Jay Blanchard

[snip]What are aiming to do that something like PHPMyAdmin doesn't
do?[/snip]

The OP never really answered this, but I don't think you can use
PHPMyAdmin to automate the generation of forms from every table in a
database. You could use the function I supplied in a loop to read each
table and spit out a form (either write a file or do it on the fly) for
those tables.

The original intent of my function was to never have to worry about
table structure ever again, just read the table info and generate a form
on the fly. Never would a form have to be hard coded again. The basis
for this script was begun 10 years ago, the one I provided to the list
was last updated in 2006 as a generic handler that really needed much
more work. It could be used as a stand-alone function or as part of a
class.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 29.10.2009 14:07:48 von Richard

Hi,

> What are aiming to do that something like PHPMyAdmin doesn't do?

Perhaps the forms are for users. And users being able to drop
databases isn't my idea of a good time. And setting up and maintaining
multiple database users is far too much work - I prefer not to provide
the interface in the first place.

--
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 25th October)
Lots of PHP and Javascript code - http://www.phpguru.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Converting tables into forms

am 02.11.2009 12:06:08 von David Robley

Bastien Koert wrote:

> On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell wrote:
>> From: Ashley Sheridan
>>
>>> On Tue, 2009-10-27 at 21:07 -0700, benc11@gmail.com wrote:
>>>
>>>> I am trying to take MySQL tables and use the table structure to
>> create
>>>> HTML/PHP forms in as few steps as possible for further development. I
>>>> have a project that has hundreds of tables and requires hundreds of
>>>> forms to be created and don't want to do so field by field by hand.
>>>>
>>>> On Tuesday, October 27, 2009, Allen McCabe
>> wrote:
>>>> > Please explain with much greater detail.
>>>> >
>>>> > On Tue, Oct 27, 2009 at 6:12 PM, benc11@gmail.com
>> wrote:
>>>> > Does anyone have a quick way of converting tables into forms?
>>>> >
>>>
>>> There is still the issue of exactly what db fields will translate
>> into.
>>> Where is a good time to use radio buttons instead of select lists, or
>>> checkboxes instead of select-multiple lists? What about text fields in
>>> the db? Should they be textareas or text inputs? Do all the db fields
>>> need to be translated as visible fields? Should you hide ID fields?
>>>
>>> There are so many questions, that you might be better off rolling your
>>> own, as a one-size-fits-all will not always work for everyone.
>>
>> I have a feeling in the pit of my stomach that your project is going to
>> create a support nightmare. Either you will have to hand code forms for
>> each table, or find a framework that dynamically creates the forms from
>> schema and create suitable maps for each form. In either case, it will
>> take weeks or months to complete and be nearly impossible to maintain
>> when tables are changed or added.
>>
>> If your solution requires you to create hundreds of forms, which could
>> take months to code, you need to take another look at the problem. I
>> don't believe you have thought it through very well.
>>
>> Bob McConnell
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> symfony might be another option, but it will take you some time to
> sort out the yaml config.
>
>
Recent versions of symfony (at least >= 1.0) can create the schema.yml from
an existing database structure or a .sql file.



Cheers
--
David Robley

This building is so high, the elevator shows movies.
Today is Sweetmorn, the 14th day of The Aftermath in the YOLD 3175.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php