Show Bid Request
Random Banner / Rotating Banner
Bid Request Id: 24161
|
|
|
Posted by: |
snowboardr (1 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Unverified
|
Approved on: |
Aug 10, 2002 5:34:33 PM EDT
|
Bidding Closes: |
Aug 24, 2002 5:40:23 PM EDT
|
Viewed (by coders): |
110 times
|
Deadline: |
8/25/2002
TIME EXPIRED
|
|
|
|
Description:
I am making a banner exchange application in ASP, and am stuck on one pretty simple thing. I would like to have a random banner show up or have it rotate through each banner in the system. I am using MySQL. And my sql statement is as follows:
strSQL = "SELECT * FROM ebanner WHERE bank > 0 AND bCat=" & sMyCat & " AND bID <> " & sMyID & " ORDER BY RAND() LIMIT 1"
But that sql statement returns only one record, and its the same record each time.
bank = credits they get for showing a banner on there page
bCat = category there sit is in
bID = User ID
bID <> " & sMyID .. (so they don't show there banner on there page)
I have also tried it with
RAND(bID)
Both ways would be appreciated. (random and rotating)
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
mysql, asp
Must be 100% finished and received by buyer on:
Aug 25, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
$7 (USD)
|
Aug 10, 2002 6:01:29 PM EDT
|
8.6
(Superb)
|
|
|
Here is a quote from 'MySQL manual': You can't use a column with RAND() values in an ORDER BY clause, because ORDER BY would evaluate the column multiple times. In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name ORDER BY RAND() This is useful to get a random sample of a set SELECT * FROM table1,table2 WHERE a=b AND c<d ORDER BY RAND() LIMIT 1000. Note that a RAND() in a WHERE clause will be re-evaluated every time the WHERE is executed.
|
|
|
|
|
N/A
|
Aug 10, 2002 6:02:38 PM EDT
|
8.6
(Superb)
|
|
|
What MySQL version do you use? |
|
|
|
|
N/A
|
Aug 10, 2002 6:15:08 PM EDT
|
8.6
(Superb)
|
|
|
Please give me all the structure of MySQL tables that you use in request. |
|
|
|
|
|