Re: sql context issues

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38062
interpreted = N
texte = Usually, you would only nest SEARCHes (that includes SQL-calls) when they are somewhat related. Example:[search ...something...] [foundItems] [firstname] [lastname]
[sql ... SELECT ... where fname=[firstName]...] [foundItems] [/foundItems] [/sql] [/foundItems] [/search]if in your case the two Database-queries are NOT related, you should separate them :[search ...] [foundItems] [firstname] [lastname]
[/foundItems] [/search] [sql ... something] [foundItems] Print something
[/foundItems] [/sql]Ciao,PeterOn Tue, 21 Aug 2001 11:08:30 Bob McPeak wrote: > This is from my sys admin. Anybody seen this? > > ----- Original Message ----- > From: Nick > To: Bob McPeak > Cc: Marla Ferrency ; Celeste Paul > > Sent: Tuesday, August 21, 2001 11:00 AM > Subject: SQL context issues > > > > Bob, maybe you should forward this to the talklist... > > > > ------------------------- Example > 1 ----------------------------------------- > > This is something I figured out that didn't make sense at first. > This > first > > example works like you would expect. both searches happen > correctly, and > the > > [firstname] and [lastname] expand out like they should for the > inner > search. > > > > [search ...something...] > > [search ...somethingelse...] > > There were [numfound] results. Listing them:
> > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/search] > > [/search] > > > > > > ------------------------- Example > 2 ---------------------------------------- > > But in this almost identical example, the [founditems] that appears > inside > > of the [SQL][/SQL] tags acts as if were outside of the tags. > Example 2 and > > Example 3 function exactly the same. Note the differences. > > > > [search ...something...] > > [SQL ... SELECT firstname,lastname ...] > > There were [numfound] results. Listing them:
> > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/SQL] > > [/search] > > > > ------------------------- Example > 3 ---------------------------------------- > > This works just like Example 2. > > > > [search ...something...] > > [SQL ... SELECT firstname,lastname ...] > > There were [numfound] results. Listing them:
> > [/SQL] > > > > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/search] > > > > -------------------------------------------------------------------------- > -- > > > > This looks like it happens because the outer search didn't have a > [founditems] > > at all, and webcatalog didn't let the [SQL] context's [founditems] > take > > precedence over the [search]'s [founditems] > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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: sql context issues (Peter Werno 2001)
  2. sql context issues (Bob McPeak 2001)
Usually, you would only nest SEARCHes (that includes SQL-calls) when they are somewhat related. Example:[search ...something...] [founditems] [firstname] [lastname]
[sql ... SELECT ... where fname=[firstName]...] [founditems] [/foundItems] [/sql] [/foundItems] [/search]if in your case the two Database-queries are NOT related, you should separate them :[search ...] [founditems] [firstname] [lastname]
[/foundItems] [/search] [sql ... something] [founditems] Print something
[/foundItems] [/sql]Ciao,PeterOn Tue, 21 Aug 2001 11:08:30 Bob McPeak wrote: > This is from my sys admin. Anybody seen this? > > ----- Original Message ----- > From: Nick > To: Bob McPeak > Cc: Marla Ferrency ; Celeste Paul > > Sent: Tuesday, August 21, 2001 11:00 AM > Subject: SQL context issues > > > > Bob, maybe you should forward this to the talklist... > > > > ------------------------- Example > 1 ----------------------------------------- > > This is something I figured out that didn't make sense at first. > This > first > > example works like you would expect. both searches happen > correctly, and > the > > [firstname] and [lastname] expand out like they should for the > inner > search. > > > > [search ...something...] > > [search ...somethingelse...] > > There were [numfound] results. Listing them:
> > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/search] > > [/search] > > > > > > ------------------------- Example > 2 ---------------------------------------- > > But in this almost identical example, the [founditems] that appears > inside > > of the [SQL][/SQL] tags acts as if were outside of the tags. > Example 2 and > > Example 3 function exactly the same. Note the differences. > > > > [search ...something...] > > [SQL ... SELECT firstname,lastname ...] > > There were [numfound] results. Listing them:
> > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/SQL] > > [/search] > > > > ------------------------- Example > 3 ---------------------------------------- > > This works just like Example 2. > > > > [search ...something...] > > [SQL ... SELECT firstname,lastname ...] > > There were [numfound] results. Listing them:
> > [/SQL] > > > > [founditems] > > [firstname] [lastname]
> > [/founditems] > > [/search] > > > > -------------------------------------------------------------------------- > -- > > > > This looks like it happens because the outer search didn't have a > [founditems] > > at all, and webcatalog didn't let the [SQL] context's [founditems] > take > > precedence over the [search]'s [founditems] > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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/ Peter Werno

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:

How true is this? (1999) [NT] ie 4.0 required (1997) WebCat vs. ASP (1999) Encrypting Credit Card Numbers (2004) international time (1997) Sku numbers (1997) [WriteFile] problems (1997) WebCat2b15MacPlugin - showing [math] (1997) Search/sort in URL Was: GuestBook example (1997) Country & Ship-to address & other fields ? (1997) Trouble with formula.db + more explanation (1997) Searching a field and returning the highest value (1997) Searching Numbers (2004) [WebDNA] MAX Date (2018) Sorting by date (1997) error -108 (1997) [OT] MacOs IE5 topmargin and leftmargin bug (2000) There's a bug in the math context ... (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) carriage returns in data (1997)