This is a discussion on "creating tables only once" within the Databases section. This forum, and the thread "creating tables only once are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
creating tables only once
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
creating tables only once
so i was just experimenting with a free web account with mysql databases, and i noticed that the "CREATE TABLE ... " thing only has to be done once, which makes sense, but if I want to do it only once, should i just load a file that does it, then take down that file? thanks guys.
|
|
|
|
#2
|
||||
|
||||
|
Re: creating tables only once
If you upload a file which says 'CREATE TABLE example...'
And then navigate to it, as long as your code is right, it will create the table. But you would use php to do that.
If you were then to navigate to that file again, it would give an error because the table already exists. MySQL will not overwrite if the table already exists. Jack
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#3
|
|||
|
|||
|
Re: creating tables only once
I would use phpMyAdmin for creating tables, most webhosts provide this software if you have MySQL enabled in your account. It makes it very quick and easy to set up all your tables and you can also view and edit table entries if you want as well.
If you have a file that contains all the table information you can import this in to phpMyAdmin and it will create all the tables for you. |
|
#4
|
|||
|
|||
|
Re: creating tables only once
okay thanks guys thats basically all i needed to know- i think i will just run a script that sets up all my tables like once then remove it. thanks
|
|
#5
|
||||
|
||||
|
Re: creating tables only once
Quote:
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#6
|
|||
|
|||
|
Re: creating tables only once
okay, bigger problem now. i cannot find a free host w/ php and mysql that actually works! two of them that i have used- gigacities and one other, i forget- refuse to save my stuff without having an error, and when it does save the source code, it changes it! it deletes all of the php, as well as the starting html ,body and other important tags, so nothing ends up showing up! how to fix? thanks
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| omg keep me away from tables !!! HELP!!! | bruno89 | Web Page Design | 5 | Jul 1st, 2007 18:33 |
| Why are tables bad? | WebNinja | Web Page Design | 17 | Jan 31st, 2007 21:31 |
| No more tables? | PicoDeath | Web Page Design | 9 | Sep 28th, 2006 18:03 |
| Tables or CSS? | bee_bo | Web Page Design | 15 | Jul 6th, 2006 08:32 |
| Tables... | dhagsjash | Web Page Design | 2 | Sep 16th, 2003 09:05 |