Jump to content

Help with random sorting


Riparian

Recommended Posts

I have a table with 2000+ entries with a considerable amount of data per record.

 

This one  table is created from a number of other tables using ....(cut to the bone)

 

mysql_query("Drop Table IF  EXISTS THETABLE ");

 

mysql_query("Create Table IF NOT EXISTS THETABLE select * from table1 where table1.in_stock='T' ");

 

mysql_query("INSERT INTO $DATA.`THETABLE ` SELECT * FROM $DATA.`table2`");

mysql_query("INSERT INTO $DATA.`THETABLE ` SELECT * FROM $DATA.`table3`");

 

etc etc

 

 

The new table is in sequential order as read from the other tables and inserted into THETABLE.

 

What I would like to do is random sort the contents and then recreate THETABLE in that random order .

 

Any help is greatly appreciated.

 

p.s.

Random sorting the table at display time is no good for me as paging through using order by rand() shows duplicates so I think it will be easier and quicker to display without sorting .

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/265372-help-with-random-sorting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.