I insert something simple like

insert into table(pri1,pri2,value) values (1,1,1);
insert into table(pri1,pri2,value) values (1,2,1);

And in MySQL 5.6 they show up as:

pri1 pri2 value
1    1     1
1    2     1

BUT

In MySQL 5.1 I do the same thing and they show up as:

pri1 pri2 value
1    2     1
1    1     1

As in the first row is the last row inserted.

Why is this? Ive seen strange things but this is one of the strangest!

It looks as though the data is just being placed at the beginning of the table in MySQL5.1 instead of the end. Unless specified, MySQL will add the inputted data to the end of the table, not the beginning. I don't recall this being different in MySQL 5.1.

How are you calling the information from the database? I'm assuming you're using the same command to call from both like you have done when inserting data?

It looks as though the data is just being placed at the beginning of the table in MySQL5.1 instead of the end. Unless specified, MySQL will add the inputted data to the end of the table, not the beginning. I don't recall this being different in MySQL 5.1. How are you calling the information from the database? I'm assuming you're using the same command to call from both like you have done when inserting data?

Your basic command:

select * from table;

I mean, I dont recall this being any different either. Like I said the code is the same except instead of connecting to one database (running on a 5.6 server) I connect to another (running 5.1)...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.