• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
select whit random? help :)

#1
[eluser]tnathos[/eluser]
Hi i have the next problem.

I have a table whit the next rows.

id, name

the id field, is an autoincrement and have 10 rows.. so i have 1, 2, 3,..10 in this table.

I need select only 3 rows, but i need select in mode random the rows for example id =2, id=7, id=10, and if again run the select id=4,id=1,id=8.. etc.

for the random i include the sentece select into (for) and send the parameter id using a variable random 1 to 10.. but how i cant get the result and put in a structure for union the others results and retunr to the view?

thanks for the advance


Messages In This Thread
select whit random? help :) - by El Forum - 10-14-2009, 08:26 AM
select whit random? help :) - by El Forum - 10-14-2009, 08:31 AM
select whit random? help :) - by El Forum - 10-14-2009, 03:35 PM
select whit random? help :) - by El Forum - 10-14-2009, 04:14 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.