ASP technology in WAP (IV.)

Source: Internet
Author: User
Choose movie theater and release time
This section of code allows the user to choose what time to watch the movie, and all the records are based on the movie selected on the previous page. Here to choose the cinema and the release time.
movie_id = Request ("movie")
sqlquery = "Select title from movie WHERE movie_id =" & movie_id
Set Rsmovie = conn. Execute (SQLQuery)
Movie_title = Rsmovie ("title")
:
sqlquery = "SELECT [Name], [TIME], [show_id] from show, theater" &_
"WHERE show.movie_id =" & movie_id &_
"And theater.theater_id = show.theater_id"
Set rsshows = conn. Execute (SQLQuery)
If you study the code carefully, you will want to use the session to save the movie information, and then the query on this page is simpler. It is also unfortunate that the session is needed
Cookies are supported, although they are also supported in the WAP specification, but are not supported in Nokia 7110, which means that we are not able to use the session in WAP
Services.
Here are some interesting things:
<select name= ' show ' >
<%
Do as not rsshows.eof
Response.Write ("<option value= '" & Rsshows ("show_id") & "' >" & Left (rsshows ("name"), Cutter) & "(" &
Rsshows ("Time") & ")" & "</option>" &vbcrlf)
Rsshows.movenext
Loop%>
</select>
If you're wondering about cutter variables, then there's something that makes you laugh and cry.
Dim Cutter
If InStr (Request.ServerVariables ("Http_user_agent"), "Nokia7110") Then
Cutter = 12
Else
Cutter = 7
End If
This code displays options based on different devices. We have plenty of reasons to do this, Nokia Toolit 1.2 emulators like to cut off my options to only a few words
character, and we have to show the movie name and release time, so we have to reduce the characters of the movie name. This problem does not occur in real phones, so we will
The type of equipment must be judged first.
Once I have the chance (flying knife I am very poor, no money, this is just a distant dream ...) Test my code on real Nokia 7110 and we'll immediately feel that we
There's a bigger screen than we thought. In fact, some cinemas have strange names, and these long names take up a lot of screen space, and we don't need to waste these display empty

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.