Re: [PHP] Loading CSV data into MySQL

2003-02-02 Thread Jason Wong
On Sunday 02 February 2003 23:10, John W. Holmes wrote: > Then don't use LOAD DATA INFILE if it's not working for you. Write a PHP > script to read each line of the file and insert it. Yes, it'll be a > little slower, but then you could also add an auto_increment or > timestamp field that'll keep

RE: [PHP] Loading CSV data into MySQL

2003-02-02 Thread John W. Holmes
> > 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. > > Hey man thanks for pointing that out... I know it's wrong, I didn't > design it but it's what I have to work with and I'm not being paid to > fix it

RE: [PHP] Loading CSV data into MySQL

2003-02-02 Thread Brian V Bonini
On Sat, 2003-02-01 at 20:07, John W. Holmes wrote: > > 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. Hey man thanks for pointing that out... I know it's wrong, I didn't design it but it's what I have to

Re: [PHP] Loading CSV data into MySQL

2003-02-02 Thread Edwin Boersma
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 yo

RE: [PHP] Loading CSV data into MySQL

2003-02-01 Thread Jason Sheets
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,

RE: [PHP] Loading CSV data into MySQL

2003-02-01 Thread John W. Holmes
> On Sat, 2003-02-01 at 17:25, John W. Holmes wrote: > > > I'm loading a .csv file into MySQL, done it a million times but for > > some > > > reason it is scrambling the row order. All the fields are making it in > > > correctly but the order of the rows seems to end up totally random. > > I've > >

RE: [PHP] Loading CSV data into MySQL

2003-02-01 Thread Brian V Bonini
On Sat, 2003-02-01 at 17:25, John W. Holmes wrote: > > I'm loading a .csv file into MySQL, done it a million times but for > some > > reason it is scrambling the row order. All the fields are making it in > > correctly but the order of the rows seems to end up totally random. > I've > > done this a

RE: [PHP] Loading CSV data into MySQL

2003-02-01 Thread John W. Holmes
> I'm loading a .csv file into MySQL, done it a million times but for some > reason it is scrambling the row order. All the fields are making it in > correctly but the order of the rows seems to end up totally random. I've > done this a million times and never saw this.. So? Why does it matter to