473,324 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Radical use of MySQL comments

Hi everyone,

My company advertises "not off the shelf" programming and what we
provide can be fit to each clients needs. With that the biggest goal
I have is to have the 80% of what everyone needs ready to roll - but
make that other 20% unique to the client's project fast to turn out.

I'm about to begin programming an "editor" page that looks at the
table being worked with - and then based on column type, naming
conventions, etc - PHP draws the form with appropriate inputs for
columns. I need to put a friendly label on the field - so instead of
"StatusID" it could say "Page Status" --- my thought is to put "Page
Status" in the comments for that field and pull it out at time of
display to the user.

Pros I see in this are
Editing the database to add/edit/remove fields will also affect the
editor page at the same time
The same edit will also handle Insert/Update statements so no SQL will
need touched
Logic written 1 time for rules of how to display column inputs will
rarely if ever need touched again
Time to finish that 20% custom to each client is drastically reduced

Can you please provide cons to this idea? So far internally its been
"Thats not how its done" and I'm asking "why can't it be done?"
Feb 13 '08 #1
1 1487
On 13 Feb, 17:57, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
On Wed, 13 Feb 2008 17:38:53 +0100, dha...@gmail.com <dha...@gmail.com>
wrote:
<snip>
>
I'm about to begin programming an "editor" page that looks at the
table being worked with - and then based on column type, naming
conventions, etc - PHP draws the form with appropriate inputs for
columns. I need to put a friendly label on the field - so instead of
"StatusID" it could say "Page Status" --- my thought is to put "Page
Status" in the comments for that field and pull it out at time of
display to the user.
<snip>
>
The problem is not this cannot be done (after all, it's basically how
PHPMyAdmin works for instance). Aside from the fact this has quite some
overhead, the problem is not all functionality can be grasped
automatically from a database/table setup/description/comments.
<snip>

....and others. Not very radical really.

The main problem here is how to maintain the metadata. There already
several solutions which attempt to address this specifically for PHP
(metabase/metastorage for instance). There are lots of non-language
specific tools out there (most of which use XML to describe the
structure). I'd be having a long hard look at what has been published
elsewhere before defining my own "standard".
(yeah, I know, stored procedures are a good thing).
....only if used correctly, and even then.....? Typically encapsulating
complex transactions is better done at the PHP layer - anything else
is a view. (C dons flame retardant overalls)

C.
Feb 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JW | last post by:
It took me a lot of trial and error to get text from an HTML form into MySQL to account for quotation marks being entered. I came up with the following. It works fine but I was wondering if this is...
5
by: ensnare | last post by:
I'm attempting to create a threaded comment system involving PHP / MySQL. Currently, I have a table called comments which looks like: Table Comments: (comment_id, comment_root_id,...
0
by: Lloyd Dobbler | last post by:
Hi, I'm not that up on SQL as a whole as I've concentrated mainly on frontend and most of the DB backend work I've done has been with "Access" as that's all the site needed. I have however...
5
by: mojo | last post by:
Is there a nice way to have HTML display mathematical expressions that contain radical symbols (square root, cube root, ..., nth root) that look nice. The best I can come up with is by having a...
1
by: pete | last post by:
I seem unable to get the FormView with the SqlDataSource control in ASP.NET 2.0 beta 2 to insert into my MySQL 4.11 database corectly. When I run the page and click on the Insert link a SQL insert...
1
tolkienarda
by: tolkienarda | last post by:
i need to update a database table using variables in unusual places here are the update statements mysql_query("UPDATE 'grades' SET '$class' = '$grade' WHERE student='$student'");...
1
Ajm113
by: Ajm113 | last post by:
Ok, when I was new to this I had this problem and I bet a lot of other people did when they where new to PHP and Mysql. So this mite be your question; "Ok, no errors or warnings in mysql and php so...
15
by: Cirene | last post by:
I'm trying to convince my client that MySQL server is not the way to go for his project. Here are some reasons why... - If you use the MySQL Connector you are bound to GPL (unless you want to pay...
2
by: Rink Web Site Developer | last post by:
Hello, I am currently having a bug with a MYSQL query for an online calendar I am writing. I have been looking at this bug for a couple days now and am still not able to figure out why it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.