I'm buildin a banner rotator on my own And I builded a bigger pat of it but now i found a problem since banners were randomly shown (using rand()) by theirs ID which is autoincresment when I deleta a banner my script could randomly generate a banner ID that does not exist any more What I'm asking for is there a way to randomly show banner by its name or some other parameter specified
Is that really an issue? I tested on a table with missing values and never showed an error doing this..
SELECT * FROM table ORDER By rand() LIMIT 1
I'll test it first but somehow I don't think that is a solution becuse I think what you did here is randomly choose the way the query is ordered but it will always show me only first banner in query
I read mySQL documentation and now I see what you were trying to tell me thanx