Re: much help needed NEWBIE alert

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33620
interpreted = N
texte = hopefully others jump in since there seems be several issues here, and I won't have time to figure them all out. You said it finds *all the movies, but when I try it it finds zero movies. The [showif [name]=Code]...[/showif] inside the [formvariables] context with, I believe, only show its contents when there is a formvariable coming in named code. Which there does not seem to be. Your form's get method shows us the formvariables in the URL (and so does a [FormVariables] context which you seem to have also stuck in, something like this-[FormVariables] -[name]=[value]
[/FormVariables] (no?) anyway... we see only 'select' and 'submit' coming in as formvariables. I tried adding &code=a to the URL and still got nothing I think that means the interior [search] is finding nothing. Let's debug one step at a time. Try adding things (below) to your pages to get it figured out piecemeal (see below) Steven Jarvis wrote:> >> a test version is up at: > >> http://www.nwanights.com/moviesWORKING/default.tpl > >> > >> WEBCAT Question #1: > >> One of those fields is show_date which is in the format: 062000 is June 20, > >> 2000. I've got it set right now to parse it with [Format Days_To_Date %A, %b > >> %d][FIELD5][/FORMAT] where FIELD5 is the show_date field in the > >> get_movies.inc. However, as you can see if you look at it, it gives me > >> 01/01/00 as the date --- for EVERY date. > > > > 062000 looks like a real date format, *not* the format where a date is > > stored as the number of days since 00/00/0000 (AD). So wrapping [FIELD5] with > > [Format Days_To_Date %A, %b%d]...[/FORMAT] would not be appropriate. Try > > wrapping it like this- [Math date]{[FIELD5]}[/Math] instead (when you want to > > display that field value as > a date.... > > That doesn't seem to be working. It now thinks the date is 01/01/1900! I > think it's not getting the actual data from the field for some reason. I'll > work more on that later. Formatting that field is trivial compared to the > other problems. > > >> WEBCAT Q #2: > >> Also, right now (this could change any second), when I search on theater via > >> a call to show_theater.tpl, it lists ALL the movies, not just the movies > >> playing at that theatre. > > > > we need to see code to help you here. please post the Webcat code for > > -http://www.nwanights.com/moviesWORKING/default.tpl > > -http://www.nwanights.com/moviesWORKING/showtheater.tpl > > Doh! I was thinking the URLs would be enough, that you could just go view > the source (see! I'm REALLY new at this). Sorry. > > The applicable part of default.tpl is: > >
> >
[!]---add this ^^^^^^^ to this form so the search on the next page fires at least once---[/!]> > >
> > The code for showtheater.tpl is: > > [formvariables] > [showif [name]=Code] > > [search db=listing.db&eqFIELD1datarq=3&eqFIELD3datarq=[value]]this search found [numfound] records
[!]---add this ^^^^^^^ here so we know if the search finds anything---[/!]> > [founditems] > [FIELD4]
> [FIELD7], [FIELD8], Telephone:[FIELD6][text]Location_Code=[FIELD3][/text] >
>
> [include file=get_movies.inc] >
>
> [/founditems] > [/search] > > [/showif] > [/formvariables] > > the code in get_movies.inc (which I'm not sure needs to be in an include, > but, again, I didn't write the thing): > > [!] ******************************************************* > GET ALL MOVIES, RATINGS, AND TIMES FOR A SPECIFIC LOCATION > Requires a variable named 'Location_Code' be set. > ******************************************************* [/!] > > [text]Movie_Codes=[/text] > > [!] ** LIST MOVIE CODES BY LOCATION ** [/!] > > [search db=listing.db&eqFIELD1datarq=5&eqFIELD2datarq=[Location_Code]] > [founditems] > > [!] ** BUILD A LIST OF MOVIE CODES ** [/!] > [text]Movie_Codes=[FIELD3] [Movie_Codes][/text] > > [/founditems] > [/search] > > > [!] ** LOOK UP MOVIE NAMES BASED ON MOVIE CODES ** [/!] > [search > db=listing.db&eqFIELD1datarq=4&woFIELD2datarq=[Movie_Codes]&asFIELD3sort=1] > [founditems] > >

> [FIELD3] > ([search > db=listing.db&eqFIELD1datarq=6&eqFIELD2datarq=[FIELD4]&max=1][founditems][FI > ELD3][/founditems][/search]) > > [search > db=listing.db&eqFIELD1datarq=5&eqFIELD2datarq=[Location_Code]&eqFIELD3datarq > =[FIELD2]&[!]eqFIELD5datarq=[date format %m%d%y]&[/!]max=1] > [founditems] >
> Date: [Math date]{[FIELD5]}[/Math] >      Show Times: > [FIELD6] > [/founditems] > [/search] > [/founditems] > [/search] > > Again, thanks for the quick response and any info you can provide. Making > the move from doing all design and info architecture work to doing the nuts > and bolts of the backend stuff is sometimes frustrating. I usually enjoy it, > though. > > Thanks, > > SteveStart with that ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: much help needed NEWBIE alert (John Butler 2000)
  2. Re: much help needed NEWBIE alert (Steven Jarvis 2000)
  3. Re: much help needed NEWBIE alert (Steven Jarvis 2000)
  4. Re: much help needed NEWBIE alert (John Butler 2000)
  5. Re: much help needed NEWBIE alert (Steven Jarvis 2000)
  6. Re: much help needed NEWBIE alert (Glenn Busbin 2000)
  7. Re: much help needed NEWBIE alert (John Butler 2000)
  8. much help needed NEWBIE alert (Steven Jarvis 2000)
hopefully others jump in since there seems be several issues here, and I won't have time to figure them all out. You said it finds *all the movies, but when I try it it finds zero movies. The [showif [name]=Code]...[/showif] inside the [formvariables] context with, I believe, only show its contents when there is a formvariable coming in named code. Which there does not seem to be. Your form's get method shows us the formvariables in the URL (and so does a [formvariables] context which you seem to have also stuck in, something like this-[formvariables] -[name]=[value]
[/FormVariables] (no?) anyway... we see only 'select' and 'submit' coming in as formvariables. I tried adding &code=a to the URL and still got nothing I think that means the interior [search] is finding nothing. Let's debug one step at a time. Try adding things (below) to your pages to get it figured out piecemeal (see below) Steven Jarvis wrote:> >> a test version is up at: > >> http://www.nwanights.com/moviesWORKING/default.tpl > >> > >> WEBCAT Question #1: > >> One of those fields is show_date which is in the format: 062000 is June 20, > >> 2000. I've got it set right now to parse it with [Format Days_To_Date %A, %b > >> %d][FIELD5][/FORMAT] where FIELD5 is the show_date field in the > >> get_movies.inc. However, as you can see if you look at it, it gives me > >> 01/01/00 as the date --- for EVERY date. > > > > 062000 looks like a real date format, *not* the format where a date is > > stored as the number of days since 00/00/0000 (AD). So wrapping [FIELD5] with > > [Format Days_To_Date %A, %b%d]...[/FORMAT] would not be appropriate. Try > > wrapping it like this- [Math date]{[FIELD5]}[/Math] instead (when you want to > > display that field value as > a date.... > > That doesn't seem to be working. It now thinks the date is 01/01/1900! I > think it's not getting the actual data from the field for some reason. I'll > work more on that later. Formatting that field is trivial compared to the > other problems. > > >> WEBCAT Q #2: > >> Also, right now (this could change any second), when I search on theater via > >> a call to show_theater.tpl, it lists ALL the movies, not just the movies > >> playing at that theatre. > > > > we need to see code to help you here. please post the Webcat code for > > -http://www.nwanights.com/moviesWORKING/default.tpl > > -http://www.nwanights.com/moviesWORKING/showtheater.tpl > > Doh! I was thinking the URLs would be enough, that you could just go view > the source (see! I'm REALLY new at this). Sorry. > > The applicable part of default.tpl is: > >
> >
[!]---add this ^^^^^^^ to this form so the search on the next page fires at least once---[/!]> > >
> > The code for showtheater.tpl is: > > [formvariables] > [showif [name]=Code] > > [search db=listing.db&eqFIELD1datarq=3&eqFIELD3datarq=[value]]this search found [numfound] records
[!]---add this ^^^^^^^ here so we know if the search finds anything---[/!]> > [founditems] > [FIELD4]
> [FIELD7], [FIELD8], Telephone:[FIELD6][text]Location_Code=[FIELD3][/text] >
>
> [include file=get_movies.inc] >
>
> [/founditems] > [/search] > > [/showif] > [/formvariables] > > the code in get_movies.inc (which I'm not sure needs to be in an include, > but, again, I didn't write the thing): > > [!] ******************************************************* > GET ALL MOVIES, RATINGS, AND TIMES FOR A SPECIFIC LOCATION > Requires a variable named 'Location_Code' be set. > ******************************************************* [/!] > > [text]Movie_Codes=[/text] > > [!] ** LIST MOVIE CODES BY LOCATION ** [/!] > > [search db=listing.db&eqFIELD1datarq=5&eqFIELD2datarq=[Location_Code]] > [founditems] > > [!] ** BUILD A LIST OF MOVIE CODES ** [/!] > [text]Movie_Codes=[FIELD3] [Movie_Codes][/text] > > [/founditems] > [/search] > > > [!] ** LOOK UP MOVIE NAMES BASED ON MOVIE CODES ** [/!] > [search > db=listing.db&eqFIELD1datarq=4&woFIELD2datarq=[Movie_Codes]&asFIELD3sort=1] > [founditems] > >

> [FIELD3] > ([search > db=listing.db&eqFIELD1datarq=6&eqFIELD2datarq=[FIELD4]&max=1][founditems][FI > ELD3][/founditems][/search]) > > [search > db=listing.db&eqFIELD1datarq=5&eqFIELD2datarq=[Location_Code]&eqFIELD3datarq > =[FIELD2]&[!]eqFIELD5datarq=[date format %m%d%y]&[/!]max=1] > [founditems] >
> Date: [Math date]{[FIELD5]}[/Math] >      Show Times: > [FIELD6] > [/founditems] > [/search] > [/founditems] > [/search] > > Again, thanks for the quick response and any info you can provide. Making > the move from doing all design and info architecture work to doing the nuts > and bolts of the backend stuff is sometimes frustrating. I usually enjoy it, > though. > > Thanks, > > SteveStart with that ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Butler

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

bannerads example idiot (1997) $Replace with [founditems] (1997) Cart Creation (2003) Help w/Multi User Admins (1997) docs for WebCatalog2 (1997) Newbie problem blah blah blah (1997) OT: test ... (2004) Building Calendars (1997) Multiple fields on 1 input (1997) ShowNext (1997) Search Question (1998) Extended [ConvertChars] (1997) Re:PCS Customer submissions ? (1997) Keep away (1997) WebMerchant and CyberCash Problem: repost (2000) 4.51 Triggers (2003) Sort Order on a page search (1997) Re:E-Mailer (WebCatb15acgiMac) (1997) macosx 1 process, linux N processes, macosx chokes under load (2001) Viewing old carts (was FEW QUESTIONS) (1997)