PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
However i need something that gets a random image that meets the requirements of the select. So only images that are suppose to load up for a certen page, or country. Kinda confused on how to do that.
SELECT image FROM tb WHERE country='somewhere' LIMIT 1
Why will that not work?
As mentioned, it's hard to judge based on the code posted as it doesn't describe fully (to me, but I might be stupid ) what it actually base the selct on...
Told you that I didn't think clearly. Still betting that the "...order by rand() limit 1... approach should come in handy, narrowing it down with the a=b clause of choise.
It should give you one image, randomly ordered.
Edited:
Oh, and I hate it when you edit posts while I'm replying.
Thanks.. I believe i need to study a bit more concerning Queries
Yah well, I'm still discovering new php functions from time to time, so... The manuals are well written, no doubt about that, but you seldom read them header to footer, so of course things get missed.