> SELECT storage_path, image_md5, id
> FROM images
> JOIN (SELECT CEIL(RAND() * (SELECT MAX(id) FROM images WHERE approved =
> 1)) AS id) AS r2 USING (id)
>WHERE approved = 1;
>
> I really do not get this, SELECT CEIL(RAND() will always return 1 will it
> not? Any idea why I get an empty
Hi,
Responses inline
On Thu, May 1, 2008 at 3:11 PM, Scott Haneda <[EMAIL PROTECTED]> wrote:
> List search seems to return 0 results, and I am a bit stumped.
>
> Getting a more optimized order by random with 1 record...
> I found a snip online that works, but seems to return an empty on occa
List search seems to return 0 results, and I am a bit stumped.
Getting a more optimized order by random with 1 record...
I found a snip online that works, but seems to return an empty on
occasion, and I am not sure why:
SELECT storage_path, image_md5, id
FROM images
JOIN (SELECT CEIL(RAND(