|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
MySQL 5 - LIMIT & RANDOM -- Issue With Return Results
Hey all.
My query is as follows: Code:
SELECT acc_id, class, race, gender, current_level, pic_url, server, short_desc, featured, price FROM outbound_acc WHERE current_status='0' ORDER BY RAND() LIMIT 3 Now what is happening is that the query sometimes returns 3 results and sometimes returns 2 results. It will never just continuously return 3. What am I doing wrong? I have a feeling that it has something to do with the interaction of the LIMIT and RANDOM setup. Any help would be appreciated. |
|
#2
|
||||
|
||||
|
If there are 3 records that fulfill the query it will return those. Otherwise I would have to see the data you are working with and how you are interacting with the database. Does this happen through PHP ? What happens if you send it directly to the database?
__________________
life is a game.... Have fun ----------------------------- http://www.phpwomen.org strength in unity PHPCommunity IRC #phpc on freenode |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > MySQL 5 - LIMIT & RANDOM -- Issue With Return Results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|