KarlisBa Posted August 25, 2009 Report Share Posted August 25, 2009 (edited) Sveiki! Ir kāds "ātrais" MySql vaicājums, kurš izvelk datus no db haotiskā secībā? Respektīvi nevis ASC vai DESC bet haotiski samaisa, ja teiksim visi tiek definēti ar id un ir 5 ieraksti, tad kaut kā šādā secībā izvelk - 41352. Doma tāda vai nav kāds ātrais vaicājums, kurš katru reizi, kad pieprasa attiecīgo kodu parāda ierakstus savādākā haotiskā secībā. Edited August 25, 2009 by KarlisBa Quote Link to comment Share on other sites More sharing options...
ohmygod Posted August 25, 2009 Report Share Posted August 25, 2009 rand() Quote Link to comment Share on other sites More sharing options...
KarlisBa Posted August 25, 2009 Author Report Share Posted August 25, 2009 Paldies! Quote Link to comment Share on other sites More sharing options...
Kaklz Posted August 26, 2009 Report Share Posted August 26, 2009 Tikai ar RAND() neaizraujies uz pārāk lielām datu kopām - būs slikti :) Quote Link to comment Share on other sites More sharing options...
KarlisBa Posted August 26, 2009 Author Report Share Posted August 26, 2009 Skaidrs, bet man tur vidēji 5. ieraksti tikai ir kuri tiek rādīti. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.