Re: Loading CSV data into MySQL
| From: | Edwin Boersma | Date: | Sun, 02 Feb 2003 09:57:07 +0000 |
| Subject: | Re: Loading CSV data into MySQL | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133980@lists.php.net to get a copy of this message | ||
Or add a "insert_date" column of type "timestamp" to the database. This will automatically store the time of insertion. Then use ORDER BY insert_date.
Edwin
Jason Sheets wrote:
You could create a integer column with an autoincrement flag, then order the rows by this column, that should give you the data in the order it was inserted into the db. Depending on your database there are other ways to do it. Jason On Sat, 2003-02-01 at 18:07, John W. Holmes wrote:On Sat, 2003-02-01 at 17:25, John W. Holmes wrote:forI'm loading a .csv file into MySQL, done it a million times butit insomereason it is scrambling the row order. All the fields are makingrandom.correctly but the order of the rows seems to end up totallyasI'vedone this a million times and never saw this..So? Why does it matter to you what order the rows are in the database,Then use an ORDER BY in your query. If you're relying on the database to spit out rows in the order they went in, then you're wrong. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phplong as the right data is there? The order is irrelevant.Because in this instance I need it to come out in the order it is actually in.