![]() |
|
|
|
|
|
|
|
|
3
5th November 10:27
External User
Posts: 1
|
Database design DOES MATTER! Get it correct before you go any further.
A sloppy design will cause you no end of problems. This doesn't mean you need 50 tables, etc. But the time spent on getting it right will be worth the effort. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
4
5th November 10:28
External User
Posts: 1
|
This is where the normalisation comes in. You are suggesting putting
the data into an, as yet, undetermined number of columns. OK, you say a maximum of 4, but experience tells us to always plan for more. Why don't you store the data like this? ID | file_prefix | file_suffix | content | ...(other file data) It's hard to give script examples without writing it for you. You can start by looking at opendir and the examples here http://www.php.net/manual/en/function.opendir.php Get the contents http://uk3.php.net/manual/en/functio...t-contents.php Then you'll have to extract the data from the file name. Chop off the extension using http://uk.php.net/manual/en/function.substr.php Finally create an array containing the file elements using http://uk.php.net/manual/en/function.explode.php Bang the whole lot into your database and Robert is your mother's brother. You may have to do it in batches. I doubt most normal setups will do this without timing out. So you'll need to query the database first to find out where you left off and start adding files from that point. -- Geoff Berrow (Put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs www.ckdog.co.uk/rfdmaker |
|
|
7
8th November 00:06
External User
Posts: 1
|
Ok, that's a little more clear. When you said placing the data in
columns, I thought you were talking about SQL database columns. You can also do it quite easily in PHP. The only difference in the what I suggested earlier would be for you to create the html for a table for a table row instead of inserting into a database. The idea would be similar in Perl or any other language. So I guess I don't understand your question, then. What have you tried so far? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|