![]() |
|
#1
|
|||
|
|||
filling databaseHi
I am filling my database with a couple of thousend 8 digits numbers. These numbers i have in a list in a text-file. Also I have a dump-sql file that i fill with these numbers by copying and pasting the numbers in between the brackets after the word VALUES in the following sentence: INSERT INTO NUMBERS (number) VALUES (); resulting in; INSERT INTO NUMBERS (number) VALUES (01234567); That i repeat with all the numbers This takes me forever.....! Is their anybody who knows a quicker way...? I would appriciate any suggestions deerly! Greetings Meeusen |
|
#2
|
||||
|
||||
|
Hello meeusen,
Yes, it's wise for you to seek an alternative solution to what you're trying to do. This is a fairly common solution by the way, so you can start with this suggestion and extend on it with whatever details you need to add to it. First, you've got to get the data off that text file into a (numerically indexed) array in your script - for example, it could end up looking like: PHP Code:
Next, you will start to build your INSERT SQL string... this can be easily done many ways but here's one, just to give you an idea... PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
Excellent
thank you very much ![]() |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple Database search | misunderstood | MySQL / PHP Forum | 11 | 04-Jun-2004 12:21 |
| Help choosing a database for home network | pcxgamer | Open Discussion Forum | 13 | 23-May-2004 14:47 |
| Parsing PHP code that's stored in a database. | JdS | MySQL / PHP Forum | 3 | 13-May-2004 09:15 |
| insert data into database | jilshi | Web Design Forum | 0 | 29-Apr-2004 22:47 |
| WInXp Apache database? | Ticoloco | Apache Web Server Forum | 1 | 27-Nov-2003 04:21 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The