members table
---------------------------------
ID CREDIT fname lname
1 24 jon smith
2 50 mark tween
3 23 sam jonson
4 61 dave derian
5 28 gio fery
6 95 anna lopez
ads table
--------------------------------...
Thank you so much it works, but when I do rand() it always gives me a first 'AID' from the group how can I randomize it like from 1 member get always different ads LIMIT 5
I have two tables members and ads, members table has auto_increment 'ID' , 'CREDIT' and some members information.
ads table has 'AID' auto_increment and 'ID' to track who's link is that
Basically 1 member can have up to 5 link ads.
I want to get from query LIMIT 5 ads who has enough credits...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.