For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > February 2006 > Insert row beteewn to old rows.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Insert row beteewn to old rows.
madsgormlarsen@gmail.com

2006-02-09, 6:59 pm

Insert row beteewn to old rows. I have a database and I need a certain
order of the rows, and would like to insert a row between tod old rows.
Can that be done?

I use phpmyadmin and i belive i once saw such a feature, but I can't
find it now.

(I know your not supposed to use the order in the database)

C

J.O. Aho

2006-02-09, 6:59 pm

madsgormlarsen@gmail.com wrote:
> Insert row beteewn to old rows. I have a database and I need a certain
> order of the rows, and would like to insert a row between tod old rows.
> Can that be done?
>
> I use phpmyadmin and i belive i once saw such a feature, but I can't
> find it now.
>
> (I know your not supposed to use the order in the database)


INSERT places the new row last, if you want it to come out in a different way
you have to change your SELECT query to sort the rows in the order you want
them to be.


//Aho
Jasen Betts

2006-02-16, 3:57 am

On 2006-02-09, madsgormlarsen@gmail.com <madsgormlarsen@gmail.com> wrote:

> Insert row beteewn to old rows. I have a database and I need a certain
> order of the rows, and would like to insert a row between tod old rows.
> Can that be done?


rows don't have predictable order unless you provide it explicitly,

Bye.
Jasen
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com