Re: [WebDNA] Search on a database

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108755
interpreted = N
texte = ---1183615881-1495325033-1330731467=:63489 Content-Type: text/plain; charset=us-ascii Govinda, 1. I would like to see all of the fields' values displayed because I don't know who is responding to this survey, or when, or even the answers to any of the questions I've asked. I'm not looking for a certain value in each field, I'm looking for the values in general. 2. I don't understand the function pipe character. Lori >here's the code I had tried: > >_______________________________________________________________________________________________________ > >> >>admin.tpl > >> [Search >>db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!] >> > > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!] > > > [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] > ] > > > >>[founditems] >Visitor ID: [visitorUniqueID]
>Date: [date]
>Time: [time]
>Learn more? [_learnMore]
>Irrigation Design? [_design]
>Name: [_visitorName]
>City: [_visitorCity]
>email: [_email]
> > >>[/founditems] > > > [/search] > >___________________________________________________________________________________________________________________ > > >>I was getting a blank page with this code. That's why I figured I wasn't >>grabbing each individual person's entry correctly. >>After I looked this over again, I had a look at the code you offered me. It's >>quite a different approach than I had imagined. I >will study this code very >>carefully. Thank you so much, again for your offerings. > >>Lori > >Hi Lori >Don't mind that I brought this back on list. I am not being mean or showing >off; this is standard procedure, honest. ; people just want to >see and learn >and help. >If you want to use code that you wrote yourself, instead of what I offered.. >then good; that is better! Do keep trying! >When I look at your code, the immediate ideas I have are: >- add "numfound=[numfound]" somewhere inside the [search]...[/search] so you >can verify that the search is indeed being parsed, but just >finding zero >records (or else it will show how many records it finds). >- look again at your [search] criteria (parameters). >You are effectively telling the search to only find those records where: >db=visitorSurvey2.db >AND both of these criteria are met: >&eqvisitorIDdatarq=[visitorUniqueID] >&eqtheDatedatarq=[date] >AND this criteria might be met: >&eqtheTimedata=[time] . >Note that these criteria should be ignored by the [search], because they are not >formed properly (bad syntax): >&learnMore=[_learnMore] >&design=[_design] >&visitorName=[url][_visitorName][/url] >&visitorCity=[url][_visitorCity][/url] >&email=[url][_email] >If you had wanted to require any found records to have a certain value for the >[email] field, for example, then the syntax for that search >parameter would be >like so: >&eqemaildata=[url][_email][/url] >...or: >&eqemaildatarq=[url][_email][/url] >...but NOT: >&email=[url][_email] >Anyway, once you decide which field(s') values you want to check, as you decide >which records to find with your search, and you get the >syntax right (check the >docs), then the next thing to consider is: what are the values for all those >variables? (i.e. what are the values >>for: [visitorUniqueID], [_learnMore], [_design], [_visitorName], [_visitorCity], [_email], > on a given page load ?) >Are those variables supposed to be populated from a form submission? Or from >URL parameters? Or how? >One way to check what the [search] tries to do on a given page load, is to place >a copy of the same search code alongside the real code, >but with the square >brackets replaced with pipes (the vertical bar character) or something.. like >for example, place this on your page, and >try it again: > |Search >db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!] > > > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!] > > > [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] > | > >>|founditems| >Visitor ID: [visitorUniqueID]
>Date: [date]
>Time: [time]
>Learn more? [_learnMore]
>Irrigation Design? [_design]
>Name: [_visitorName]
>City: [_visitorCity]
>email: [_email]
>>|/founditems| > >> |/search| ...then you can actually see what is being stuck into those variables which the search criteria is comparing against. What shows on the page when you try that? >It seems odd that on the one hand you just want to see peoples' survey responses >(what people have submitted using your survey form), but on the other hand to >find those records your code is potentially checking ALL those various fields. > Don't you just want to see all the records submitted on a given day (or in a >given date range)? If so, then why make your search check to see what is in the >[name] field .. or in the [email] field, etc.? The code you just showed (if it >had proper syntax) as if means to only find records with a certain value in >EVERY single field. (!?) ...well if you already know the exact value for every >field, then why even bother searching for that record? I assume you really >meant to search for records where just ONE of the fields equals a certain value >(like where the date is yesterday, for example >>("...&eqtheDatedatarq=[showResponsesOnThisDate]...")). >Keep at it.. and keep asking questions. It gets clear with practice. Keep >admitting blind spots in your understanding of the code, where >they are.. then >we can know to put more attention and shed more light there. >- Govinda ---1183615881-1495325033-1330731467=:63489 Content-Type: text/html; charset=us-ascii
Govinda,

1. I would like to see all of the fields' values displayed because I don't know who is responding to this survey, or when, or even the answers to any of the questions I've asked. I'm not looking for a certain value in each field, I'm looking for the values in general.

2. I don't understand the function pipe character.

Lori
 


>here's the code I had tried:

_______________________________________________________________________________________________________
>
>admin.tpl

> [Search db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!]
  > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!]
 >  [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] ]
  


>[founditems]
Visitor ID: [visitorUniqueID]<br>
Date: [date]<br>
Time: [time]<br>
Learn more? [_learnMore]<br>
Irrigation Design? [_design]<br>
Name: [_visitorName]<br>
City: [_visitorCity]<br>
email: [_email]<br>


>[/founditems]
  
 > [/search]
 
___________________________________________________________________________________________________________________

>I was getting a blank page with this code. That's why I figured I wasn't grabbing each individual person's entry correctly.
>After I looked this over again, I had a look at the code you offered me. It's quite a different approach than I had imagined. I >will study this code very carefully. Thank you so much, again for your offerings. 

>Lori


>Hi Lori

>Don't mind that I brought this back on list.  I am not being mean or showing off; this is standard procedure, honest.  ;  people just want to >see and learn and help.

>If you want to use code that you wrote yourself, instead of what I offered.. then good; that is better!  Do keep trying!

>When I look at your code, the immediate ideas I have are:

>- add  "numfound=[numfound]"  somewhere inside the [search]...[/search] so you can verify that the search is indeed being parsed, but just >finding zero records (or else it will show how many records it finds).
>- look again at your [search] criteria (parameters).  

>You are effectively telling the search to only find those records where:

>db=visitorSurvey2.db

>AND both of these criteria are met:

>&eqvisitorIDdatarq=[visitorUniqueID]
>&eqtheDatedatarq=[date]

>AND this criteria might be met:

>&eqtheTimedata=[time]
.

>Note that these criteria should be ignored by the [search], because they are not formed properly (bad syntax):

>&learnMore=[_learnMore]
>&design=[_design]
>&visitorName=[url][_visitorName][/url]
>&visitorCity=[url][_visitorCity][/url]
>&email=[url][_email] 

>If you had wanted to require any found records to have a certain value for the [email] field, for example, then the syntax for that search >parameter would be like so:
>&eqemaildata=[url][_email][/url] 

>...or:
>&eqemaildatarq=[url][_email][/url] 

>...but NOT:
>&email=[url][_email] 

>Anyway, once you decide which field(s') values you want to check, as you decide which records to find with your search, and you get the >syntax right (check the docs), then the next thing to consider is: what are the values for all those variables?  (i.e. what are the values >for: [visitorUniqueID], [_learnMore], [_design], [_visitorName], [_visitorCity], [_email], on a given page load ?)
>Are those variables supposed to be populated from a form submission?  Or from URL parameters?  Or how?  
>One way to check what the [search] tries to do on a given page load, is to place a copy of the same search code alongside the real code, >but with the square brackets replaced with pipes (the vertical bar character) or something..  like for example, place this on your page, and >try it again:

> |Search db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!]
  > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!]
 >  [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] |
  
>|founditems|
Visitor ID: [visitorUniqueID]<br>
Date: [date]<br>
Time: [time]<br>
Learn more? [_learnMore]<br>
Irrigation Design? [_design]<br>
Name: [_visitorName]<br>
City: [_visitorCity]<br>
email: [_email]<br>
>|/founditems|
  
>  |/search|

...then you can actually see what is being stuck into those variables which the search criteria is comparing against.
What shows on the page when you try that?


>It seems odd that on the one hand you just want to see peoples' survey responses (what people have submitted using your survey form), but on the other hand to find those records your code is potentially checking ALL those various fields.  Don't you just want to see all the records submitted on a given day (or in a given date range)?  If so, then why make your search check to see what is in the [name] field .. or in the [email] field, etc.?  The code you just showed (if it had proper syntax) as if means to only find records with a certain value in EVERY single field. (!?)  ...well if you already know the exact value for every field, then why even bother searching for that record?  I assume you really meant to search for records where just ONE of the fields equals a certain value (like where the date is yesterday, for example >("...&eqtheDatedatarq=[showResponsesOnThisDate]...")).

>Keep at it.. and keep asking questions.  It gets clear with practice.  Keep admitting blind spots in your understanding of the code, where >they are.. then we can know to put more attention and shed more light there.

>- Govinda
---1183615881-1495325033-1330731467=:63489-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Search on a database (Govinda 2012)
  2. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  3. Re: [WebDNA] Search on a database (Govinda 2012)
  4. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  5. Re: [WebDNA] Search on a database (Govinda 2012)
  6. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  7. Re: [WebDNA] Search on a database (Govinda 2012)
  8. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  9. Re: [WebDNA] Search on a database (Govinda 2012)
  10. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  11. Re: [WebDNA] Search on a database (Govinda 2012)
  12. Re: [WebDNA] Search on a database (Govinda 2012)
  13. Re: [WebDNA] Search on a database (Lori Palmquist 2012)
  14. Re: [WebDNA] Search on a database (Govinda 2012)
  15. Re: [WebDNA] Search on a database (aaronmichaelmusic@gmail.com 2012)
  16. [WebDNA] Search on a database (Lori Palmquist 2012)
---1183615881-1495325033-1330731467=:63489 Content-Type: text/plain; charset=us-ascii Govinda, 1. I would like to see all of the fields' values displayed because I don't know who is responding to this survey, or when, or even the answers to any of the questions I've asked. I'm not looking for a certain value in each field, I'm looking for the values in general. 2. I don't understand the function pipe character. Lori >here's the code I had tried: > >_______________________________________________________________________________________________________ > >> >>admin.tpl > >> [Search >>db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!] >> > > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!] > > > [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] > ] > > > >>[founditems] >Visitor ID: [visitorUniqueID]
>Date: [date]
>Time: [time]
>Learn more? [_learnMore]
>Irrigation Design? [_design]
>Name: [_visitorName]
>City: [_visitorCity]
>email: [_email]
> > >>[/founditems] > > > [/search] > >___________________________________________________________________________________________________________________ > > >>I was getting a blank page with this code. That's why I figured I wasn't >>grabbing each individual person's entry correctly. >>After I looked this over again, I had a look at the code you offered me. It's >>quite a different approach than I had imagined. I >will study this code very >>carefully. Thank you so much, again for your offerings. > >>Lori > >Hi Lori >Don't mind that I brought this back on list. I am not being mean or showing >off; this is standard procedure, honest. ; people just want to >see and learn >and help. >If you want to use code that you wrote yourself, instead of what I offered.. >then good; that is better! Do keep trying! >When I look at your code, the immediate ideas I have are: >- add "numfound=[numfound]" somewhere inside the [search]...[/search] so you >can verify that the search is indeed being parsed, but just >finding zero >records (or else it will show how many records it finds). >- look again at your [search] criteria (parameters). >You are effectively telling the search to only find those records where: >db=visitorSurvey2.db >AND both of these criteria are met: >&eqvisitorIDdatarq=[visitorUniqueID] >&eqtheDatedatarq=[date] >AND this criteria might be met: >&eqtheTimedata=[time] . >Note that these criteria should be ignored by the [search], because they are not >formed properly (bad syntax): >&learnMore=[_learnMore] >&design=[_design] >&visitorName=[url][_visitorName][/url] >&visitorCity=[url][_visitorCity][/url] >&email=[url][_email] >If you had wanted to require any found records to have a certain value for the >[email] field, for example, then the syntax for that search >parameter would be >like so: >&eqemaildata=[url][_email][/url] >...or: >&eqemaildatarq=[url][_email][/url] >...but NOT: >&email=[url][_email] >Anyway, once you decide which field(s') values you want to check, as you decide >which records to find with your search, and you get the >syntax right (check the >docs), then the next thing to consider is: what are the values for all those >variables? (i.e. what are the values >>for: [visitorUniqueID], [_learnMore], [_design], [_visitorName], [_visitorCity], [_email], > on a given page load ?) >Are those variables supposed to be populated from a form submission? Or from >URL parameters? Or how? >One way to check what the [search] tries to do on a given page load, is to place >a copy of the same search code alongside the real code, >but with the square >brackets replaced with pipes (the vertical bar character) or something.. like >for example, place this on your page, and >try it again: > |Search >db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!] > > > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!] > > > [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] > | > >>|founditems| >Visitor ID: [visitorUniqueID]
>Date: [date]
>Time: [time]
>Learn more? [_learnMore]
>Irrigation Design? [_design]
>Name: [_visitorName]
>City: [_visitorCity]
>email: [_email]
>>|/founditems| > >> |/search| ...then you can actually see what is being stuck into those variables which the search criteria is comparing against. What shows on the page when you try that? >It seems odd that on the one hand you just want to see peoples' survey responses >(what people have submitted using your survey form), but on the other hand to >find those records your code is potentially checking ALL those various fields. > Don't you just want to see all the records submitted on a given day (or in a >given date range)? If so, then why make your search check to see what is in the >[name] field .. or in the [email] field, etc.? The code you just showed (if it >had proper syntax) as if means to only find records with a certain value in >EVERY single field. (!?) ...well if you already know the exact value for every >field, then why even bother searching for that record? I assume you really >meant to search for records where just ONE of the fields equals a certain value >(like where the date is yesterday, for example >>("...&eqtheDatedatarq=[showResponsesOnThisDate]...")). >Keep at it.. and keep asking questions. It gets clear with practice. Keep >admitting blind spots in your understanding of the code, where >they are.. then >we can know to put more attention and shed more light there. >- Govinda ---1183615881-1495325033-1330731467=:63489 Content-Type: text/html; charset=us-ascii
Govinda,

1. I would like to see all of the fields' values displayed because I don't know who is responding to this survey, or when, or even the answers to any of the questions I've asked. I'm not looking for a certain value in each field, I'm looking for the values in general.

2. I don't understand the function pipe character.

Lori
 


>here's the code I had tried:

_______________________________________________________________________________________________________
>
>admin.tpl

> [Search db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!]
  > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!]
 >  [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] ]
  


>[founditems]
Visitor ID: [visitorUniqueID]<br>
Date: [date]<br>
Time: [time]<br>
Learn more? [_learnMore]<br>
Irrigation Design? [_design]<br>
Name: [_visitorName]<br>
City: [_visitorCity]<br>
email: [_email]<br>


>[/founditems]
  
 > [/search]
 
___________________________________________________________________________________________________________________

>I was getting a blank page with this code. That's why I figured I wasn't grabbing each individual person's entry correctly.
>After I looked this over again, I had a look at the code you offered me. It's quite a different approach than I had imagined. I >will study this code very carefully. Thank you so much, again for your offerings. 

>Lori


>Hi Lori

>Don't mind that I brought this back on list.  I am not being mean or showing off; this is standard procedure, honest.  ;  people just want to >see and learn and help.

>If you want to use code that you wrote yourself, instead of what I offered.. then good; that is better!  Do keep trying!

>When I look at your code, the immediate ideas I have are:

>- add  "numfound=[numfound]"  somewhere inside the [search]...[/search] so you can verify that the search is indeed being parsed, but just >finding zero records (or else it will show how many records it finds).
>- look again at your [search] criteria (parameters).  

>You are effectively telling the search to only find those records where:

>db=visitorSurvey2.db

>AND both of these criteria are met:

>&eqvisitorIDdatarq=[visitorUniqueID]
>&eqtheDatedatarq=[date]

>AND this criteria might be met:

>&eqtheTimedata=[time]
.

>Note that these criteria should be ignored by the [search], because they are not formed properly (bad syntax):

>&learnMore=[_learnMore]
>&design=[_design]
>&visitorName=[url][_visitorName][/url]
>&visitorCity=[url][_visitorCity][/url]
>&email=[url][_email] 

>If you had wanted to require any found records to have a certain value for the [email] field, for example, then the syntax for that search >parameter would be like so:
>&eqemaildata=[url][_email][/url] 

>...or:
>&eqemaildatarq=[url][_email][/url] 

>...but NOT:
>&email=[url][_email] 

>Anyway, once you decide which field(s') values you want to check, as you decide which records to find with your search, and you get the >syntax right (check the docs), then the next thing to consider is: what are the values for all those variables?  (i.e. what are the values >for: [visitorUniqueID], [_learnMore], [_design], [_visitorName], [_visitorCity], [_email], on a given page load ?)
>Are those variables supposed to be populated from a form submission?  Or from URL parameters?  Or how?  
>One way to check what the [search] tries to do on a given page load, is to place a copy of the same search code alongside the real code, >but with the square brackets replaced with pipes (the vertical bar character) or something..  like for example, place this on your page, and >try it again:

> |Search db=visitorSurvey2.db&eqvisitorIDdatarq=[visitorUniqueID]&eqtheDatedatarq=[date][!]
  > [/!]&eqtheTimedata=[time]&learnMore=[_learnMore]&design=[_design][!]
 >  [/!]&visitorName=[url][_visitorName][/url]&visitorCity=[url][_visitorCity][/url]&email=[url][_email] |
  
>|founditems|
Visitor ID: [visitorUniqueID]<br>
Date: [date]<br>
Time: [time]<br>
Learn more? [_learnMore]<br>
Irrigation Design? [_design]<br>
Name: [_visitorName]<br>
City: [_visitorCity]<br>
email: [_email]<br>
>|/founditems|
  
>  |/search|

...then you can actually see what is being stuck into those variables which the search criteria is comparing against.
What shows on the page when you try that?


>It seems odd that on the one hand you just want to see peoples' survey responses (what people have submitted using your survey form), but on the other hand to find those records your code is potentially checking ALL those various fields.  Don't you just want to see all the records submitted on a given day (or in a given date range)?  If so, then why make your search check to see what is in the [name] field .. or in the [email] field, etc.?  The code you just showed (if it had proper syntax) as if means to only find records with a certain value in EVERY single field. (!?)  ...well if you already know the exact value for every field, then why even bother searching for that record?  I assume you really meant to search for records where just ONE of the fields equals a certain value (like where the date is yesterday, for example >("...&eqtheDatedatarq=[showResponsesOnThisDate]...")).

>Keep at it.. and keep asking questions.  It gets clear with practice.  Keep admitting blind spots in your understanding of the code, where >they are.. then we can know to put more attention and shed more light there.

>- Govinda
---1183615881-1495325033-1330731467=:63489-- Lori Palmquist

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:

Field name-subcategory (1997) Re1000001: Setting up shop (1997) ShowNext and random sort (1998) off topic fetch vs PCS photomaster (1997) Add to a field (1998) How to put the Trademark Symbol (%99) in Sendmail? (2003) Processing stops (2006) [object] Tag & WebDNA Support (2005) [WebDNA] Send URL Get without waiting for response (2014) Searching multiple fields from one form field (1997) Limit to Field Length in DB (1998) WCS Newbie question (1997) [WebDNA] Google Maps (2019) A little help on e-mail (HELP!!! :-) ) (1998) credit card authorization question (1997) WebCat2b12 - nesting [tags] (1997) Odd search results, or odd programmer, not sure which... (2002) Sorting by date (1997) old mail...problem with listserv? (1998) 2.01 upgrade problems (1997)