Insert row

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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)


Re: Insert row wrote:
Quoted text here. Click to load it

If there is a index column using auto-increment it will be hard to
insert the record in between as MySQL interferes, if there is no
auto-increment column, it should be possible to insert using a
self-assigned id in your insert statement.


NB Did you forget to backup your data?

Re: Insert row

Quoted text here. Click to load it

The only ordering between records in a table is by the values in them.  To
insert a record between two others, you must specifying a value that is
between the values in the same column in the other two records.  Then ORDER
BY that column when you query the records back out.  That's what you can do.

Bill K.

Site Timeline