Please show us your code.
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
If your code is not relevant, what is? Does it mean you didn't even try a solution?
Test this one:
create table tBefore
(id integer,
y integer,
z integer,
p integer);
insert into tBefore values
(1,1,9,8),
(2,4,7,10),
(3,7,12,3);
create table tAfter
(id integer not null auto_increment primary key,
y integer,
z integer,
p integer);
insert into tAfter (y,z,p) (select y,z,p from tBefore order by p);
select * from tAfter;
And what do you mean by "order it randomly"? Maybe you just replace "order by p" in the above query with "order by rand()";
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254