Hi All,
I am working on a registration system, and one of the things I am going to
need to be able to do it setup the database tables for each event that I
have registration for. Normally I would do this by hand, but I am wondering
if there are any code libraries out there that could generate the SQL for
me.
Basically I would have a list of column names and types. I know I could
just foreach() through the list, with a switch to divert control to the
different code segments depending on the column type, and at the end I would
have the SQL generated.
This seems like the sort of thing that somebody might have done before and
released a code snippet for. Maybe in PEAR DB? Any ideas?
Sincerely,
-Josh 11 2076
Why on earth don't you use phpMyAdmin? Everybody else does. Visit http://www.phpmyadmin.net and download the source.
--
Tony Marston http://www.tonymarston.net
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote in message
news:p2bId.10812$ef6.10589@trnddc07... Hi All,
I am working on a registration system, and one of the things I am going to need to be able to do it setup the database tables for each event that I have registration for. Normally I would do this by hand, but I am wondering if there are any code libraries out there that could generate the SQL for me.
Basically I would have a list of column names and types. I know I could just foreach() through the list, with a switch to divert control to the different code segments depending on the column type, and at the end I would have the SQL generated.
This seems like the sort of thing that somebody might have done before and released a code snippet for. Maybe in PEAR DB? Any ideas?
Sincerely, -Josh
"Tony Marston" <to**@NOSPAM.demon.co.uk> wrote in message
news:cs*******************@news.demon.co.uk... Why on earth don't you use phpMyAdmin? Everybody else does. Visit http://www.phpmyadmin.net and download the source.
I must not have asked my question clearly enough - I do not need an end user
application. I was looking for a code library
Scraping the bits I want out of phpMyAdmin is of course an option. But I
was wondering if there was an existing libraries out there that I could just
drop in to place (or include() in place, as the case may be).
I noticed that Message-ID: <p2bId.10812$ef6.10589@trnddc07> from Joshua
Beall contained the following: I am working on a registration system, and one of the things I am going to need to be able to do it setup the database tables for each event that I have registration for. Normally I would do this by hand, but I am wondering if there are any code libraries out there that could generate the SQL for me.
A table for each event? Are you sure you mean that?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
"Geoff Berrow" <bl@ckdog.co.uk> wrote in message
news:qo********************************@4ax.com... I noticed that Message-ID: <p2bId.10812$ef6.10589@trnddc07> from Joshua Beall contained the following:
I am working on a registration system, and one of the things I am going to need to be able to do it setup the database tables for each event that I have registration for. Normally I would do this by hand, but I am wondering if there are any code libraries out there that could generate the SQL for me.
A table for each event? Are you sure you mean that?
Do you have another suggestion? I couldn't think of any other way to do it,
since the information collected for each event will be different (possibly
*very* different).
I'm open to new ideas, though.
I noticed that Message-ID: <MJbId.3567$BL3.3361@trnddc01> from Joshua
Beall contained the following: A table for each event? Are you sure you mean that?
Do you have another suggestion? I couldn't think of any other way to do it, since the information collected for each event will be different (possibly *very* different).
Ah I see what you mean. So an event is like a conference and you want
to store delegate details. Some events may just want name and address
some may want name address, flight details, nationality and so on?
I still don't see why you can't use phpMyadmin to create the tables...
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Why not use one table to hold all the events, and another to hold the
details or whatever you need to hold and the ID of the event. Then you
can access it with a query such as
SELECT * FROM events AS e JOIN details AS d ON (e.id=d.event_id)
Best of Luck.
-Wes
"Geoff Berrow" <bl@ckdog.co.uk> wrote in message
news:oh********************************@4ax.com... Do you have another suggestion? I couldn't think of any other way to do it, since the information collected for each event will be different (possibly *very* different). Ah I see what you mean. So an event is like a conference and you want to store delegate details. Some events may just want name and address some may want name address, flight details, nationality and so on?
Right, exactly.
I still don't see why you can't use phpMyadmin to create the tables...
Well, I *could*, I'm just wondering if there is a way I could automate the
process. See, my end goal is to just be able to write up an XML file that
describes the conference (name, fields, what fields are required, etc), and
then be able to run a script that will generate the form to collect the
information and the table where that info will be stored.
But I think where I'm landing for now is to just do make the table by hand.
Some time down the road I may try and make it more automated.
"ncf" <no***************@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com... Why not use one table to hold all the events, and another to hold the details or whatever you need to hold and the ID of the event. Then you can access it with a query such as
SELECT * FROM events AS e JOIN details AS d ON (e.id=d.event_id)
The thing is that this would produce multiple rows for one entry in the
events table. I'd rather not do that. :-/
Joshua Beall wrote: "Geoff Berrow" <bl@ckdog.co.uk> wrote in message news:oh********************************@4ax.com...
Do you have another suggestion? I couldn't think of any other way to do it, since the information collected for each event will be different (possibly *very* different).
Ah I see what you mean. So an event is like a conference and you want to store delegate details. Some events may just want name and address some may want name address, flight details, nationality and so on?
Right, exactly.
I still don't see why you can't use phpMyadmin to create the tables...
Well, I *could*, I'm just wondering if there is a way I could automate the process. See, my end goal is to just be able to write up an XML file that describes the conference (name, fields, what fields are required, etc), and then be able to run a script that will generate the form to collect the information and the table where that info will be stored.
But I think where I'm landing for now is to just do make the table by hand. Some time down the road I may try and make it more automated.
I have found that cut and paste is my friend. For me it is
faster and easier to create model procedures and then modify
them to suit individual applications/tables. Use your favorite
editor to build three php programs, one to create a table with a
primary key and one to generate a form to collect the data to be
used in populating the table and one to process and store the
data.
To handle a new event copy the three progams, edit, execute,
test and verify the results. You should be able to add a new
event in less than ten minutes.
HTH
Jerry
It now appears that the problem your were asking this newsgroup to solve was
totally unrelated to the subject line.
"PHP code/libraries for creating MySQL databases" is about CREATING
databases, not maintaining the contents of databases.
If you do not ask the right question then how are we supposed to supply the
right answer?
If you want to look at the method I have created for automating this process
then take a look at the following articles: http://www.tonymarston.co.uk/php-mys...seobjects.html http://www.tonymarston.co.uk/php-mys...eobjects2.html http://www.tonymarston.co.uk/php-mys...structure.html http://www.tonymarston.co.uk/php-mys...plication.html
The last article contains a link where you can run my sample application
online, with another to download the source code to see how it's done.
Hope this helps.
--
Tony Marston http://www.tonymarston.net
"Jerry Gitomer" <jg******@verizon.net> wrote in message
news:sTkId.7849$hC2.6999@trndny04... Joshua Beall wrote: "Geoff Berrow" <bl@ckdog.co.uk> wrote in message news:oh********************************@4ax.com...
Do you have another suggestion? I couldn't think of any other way to do it, since the information collected for each event will be different (possibly *very* different).
Ah I see what you mean. So an event is like a conference and you want to store delegate details. Some events may just want name and address some may want name address, flight details, nationality and so on?
Right, exactly.
I still don't see why you can't use phpMyadmin to create the tables...
Well, I *could*, I'm just wondering if there is a way I could automate the process. See, my end goal is to just be able to write up an XML file that describes the conference (name, fields, what fields are required, etc), and then be able to run a script that will generate the form to collect the information and the table where that info will be stored.
But I think where I'm landing for now is to just do make the table by hand. Some time down the road I may try and make it more automated. I have found that cut and paste is my friend. For me it is faster and easier to create model procedures and then modify them to suit individual applications/tables. Use your favorite editor to build three php programs, one to create a table with a primary key and one to generate a form to collect the data to be used in populating the table and one to process and store the data.
To handle a new event copy the three progams, edit, execute, test and verify the results. You should be able to add a new event in less than ten minutes.
HTH Jerry
In article <8AbId.3566$BL3.127@trnddc01>,
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote: "Tony Marston" <to**@NOSPAM.demon.co.uk> wrote in message news:cs*******************@news.demon.co.uk... Why on earth don't you use phpMyAdmin? Everybody else does. Visit http://www.phpmyadmin.net and download the source.
I must not have asked my question clearly enough - I do not need an end user application. I was looking for a code library
Scraping the bits I want out of phpMyAdmin is of course an option. But I was wondering if there was an existing libraries out there that I could just drop in to place (or include() in place, as the case may be).
Yeah, after reading this thread, I'm still confused about what you're
trying to do and what your requirements are. A class with functions to
manipulate MySQL databases? Something to populate an existing database?
For a class, there are a number of things out there. There's PEAR's DB.
I use an SQL class I got from http://www.phpclasses.org
Try explaining more fully what your trying to accomplish rather than a
solution.
--
DeeDee, don't press that button! DeeDee! NO! Dee... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bigoxygen |
last post by:
Hi.
I'm using a 3 tier FrontController Design for my web application right
now.
The problem is that I'm finding to have to duplicate a lot of code for
similar functions; for example, listing...
|
by: Gary L. Burnore |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.mysql
This is an invitation to discuss the following proposal to create
newsgroup comp.databases.mysql. Please note that YOU CANNOT...
|
by: William Drew |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.mysql
This is an invitation to discuss the following proposal to create newsgroup
comp.databases.mysql. Please note that YOU...
|
by: Ola Ogunneye |
last post by:
--=_104E0413.12733F99
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I am running mysql 4.0.13 and using a weblog(Geeklog) to do my web.
Using geeklog as been okay...
|
by: Ola Ogunneye |
last post by:
--=_075912CF.F899D547
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Hello again all,
I have created an account in the particular database that I was trying
to...
|
by: Cheryl Langdon |
last post by:
Hello everyone,
This is my first attempt at getting help in this manner. Please
forgive me if this is an inappropriate request.
I suddenly find myself in urgent need of instruction on how to...
|
by: Steven Bethard |
last post by:
Jean-Paul Calderone <exarkun@divmod.comwrote:
Interesting. Could you give a few illustrations of this? (I didn't run
into the same problem at all, so I'm curious.)
Steve
|
by: abdoelmasry |
last post by:
Hi All
i have webserver , i want to use mysql databases in websites
but
when i installed mysql server i found that
any one have the password for the root can
access to all databases on the...
|
by: Coldfire |
last post by:
Since i cannot show the differences in a two-column like table. I am first putting
MS SQL Server 2005 and then MySQL 5.x.
MS SQL Server 2005
Brief Overview
- SQL Server is a full-fledged...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |