Re: [PHP] Re: Converting tables into forms

2009-11-02 Thread 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, ben...@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, ben...@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



Re: [PHP] Re: Converting tables into forms

2009-10-29 Thread 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: [PHP] Re: Converting tables into forms

2009-10-29 Thread 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: [PHP] Re: Converting tables into forms

2009-10-29 Thread Tom Barrett
Apologies for semi-hijacking, but I am confused.

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

2009/10/28 ben...@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.
> >
>


Re: [PHP] Re: Converting tables into forms

2009-10-28 Thread ben...@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.
>


RE: [PHP] Re: Converting tables into forms

2009-10-28 Thread 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. 

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



Re: [PHP] Re: Converting tables into forms

2009-10-28 Thread Bastien Koert
On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell  wrote:
> From: Ashley Sheridan
>
>> On Tue, 2009-10-27 at 21:07 -0700, ben...@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, ben...@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: [PHP] Re: Converting tables into forms

2009-10-28 Thread Bob McConnell
From: Ashley Sheridan

> On Tue, 2009-10-27 at 21:07 -0700, ben...@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, ben...@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



[PHP] Re: Converting tables into forms

2009-10-28 Thread Shawn McKenzie
ben...@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, ben...@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: [PHP] Re: Converting tables into forms

2009-10-28 Thread Ashley Sheridan
On Tue, 2009-10-27 at 21:07 -0700, ben...@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, ben...@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




Re: [PHP] Re: Converting tables into forms

2009-10-27 Thread Robert Cummings

ben...@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: [PHP] Re: Converting tables into forms

2009-10-27 Thread James McLean
On Wed, Oct 28, 2009 at 2:37 PM, ben...@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



[PHP] Re: Converting tables into forms

2009-10-27 Thread ben...@gmail.com
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, ben...@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