• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Week: 3 At a Glance > Answers for Day 15, “Advanced Techniques: Converting Exis...

Answers for Day 15, “Advanced Techniques: Converting Existing Web Sites to Use Dynamic Tools”

1: What does % do?
A1: The % character, in a SQL pattern, matches any number of occurrences of any given character.
2: Why do randomized images come up repeatedly?
A2: You don't necessarily get a new image each time your randomized banner reloads because each reload is an independent event. Statistics tells us that independent events are of equal likelihood—or it is equally probable that you'd get the same image on a reload that you got on the first load.
3: Why must a separate variable containing % be inserted into the code?
A3: In order to keep the sequence <% or %> from occurring, we have to store % in a variable, and then concatenate it and the query string together.
4: Why isn't it important that multiple images are returned in the randomized banner and time-based image applications?
A4: Because you only have access to the first record in a recordset without adding a repeating region or other server behavior, you are limited to accessing one value anyway.
5: What does the RAND() function do in MySQL?
A5: Returns a random number. When used with ORDER BY, the ordering of the records is randomized each time the query is performed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint