Re: [WebDNA] Now: Listfields does not work with tables - Was: [OT] MySQL Users

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106970
interpreted = N
texte = Here's one to spark your imagination, Donovan=85=20 I've been known to have code in one place that decides whether it's = using a db or a table: [text]tDBPath=3D[if = =85][then]db=3Dmy.db[/then][else]table=3Dmytable[/else][/if][/text] =85 then later use that in a search: [search [tDBPath]&wofielddata=3D=85] =85 It would be nice to be able to then use listfields: [listfields [tDBPath]] [fieldname]=3D[interpret][[fieldname]][/interpret]
[/listfields] Sure there are workarounds, but every WebDNA tag that takes a "db" = parameter should alternatively take a "table" parameter so consistent = coding can be used / reused. Brian Fries BrainScan Software On Jul 15, 2011, at 12:19 PM, Govinda wrote: > that is a good workaround, Donovan. :-) >=20 > The main need I had for listfields with tables.. was for debugging. - = One short script to debug any table (spit out all its .hdr and = records). > Sure I could write it another way.. like using your suggestion too.. = but we have been relying on listfields for years.. and it was just = knee-jerk-natural to reach for it when using [table]s too. >=20 > - Govinda > -------------- > Old WebDNA talklist archives: > http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >=20 >=20 >> Personally, I can't imagine a need for [listfields..] to work with = [table..], because tables only persist in the scope of a page/process. >>=20 >> If you need to list the fields after the table has been defined, I = would initiate them with a text context: >>=20 >> ---------- >> [text]t_fields=3Did,name[/text] >> [table name=3Dtb_test&fields=3D[t_fields]] >> 1Fred >> 2john >> [/table] >>=20 >> [listwords words=3D[t_fields]] >> [word]
>> [/listwords] >> ---------- >>=20 >>=20 >> Donovan >>=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us >=20 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Now: Listfields does not work with tables - Was: [OT] MySQL Users (Brian Fries 2011)
  2. Re: [WebDNA] Now: Listfields does not work with tables - Was: [OT] MySQL Users (Govinda 2011)
Here's one to spark your imagination, Donovan=85=20 I've been known to have code in one place that decides whether it's = using a db or a table: [text]tDBPath=3D[if = =85][then]db=3Dmy.db[/then][else]table=3Dmytable[/else][/if][/text] =85 then later use that in a search: [search [tDBPath]&wofielddata=3D=85] =85 It would be nice to be able to then use listfields: [listfields [tDBPath]] [fieldname]=3D[interpret][[fieldname]][/interpret]
[/listfields] Sure there are workarounds, but every WebDNA tag that takes a "db" = parameter should alternatively take a "table" parameter so consistent = coding can be used / reused. Brian Fries BrainScan Software On Jul 15, 2011, at 12:19 PM, Govinda wrote: > that is a good workaround, Donovan. :-) >=20 > The main need I had for listfields with tables.. was for debugging. - = One short script to debug any table (spit out all its .hdr and = records). > Sure I could write it another way.. like using your suggestion too.. = but we have been relying on listfields for years.. and it was just = knee-jerk-natural to reach for it when using [table]s too. >=20 > - Govinda > -------------- > Old WebDNA talklist archives: > http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >=20 >=20 >> Personally, I can't imagine a need for [listfields..] to work with = [table..], because tables only persist in the scope of a page/process. >>=20 >> If you need to list the fields after the table has been defined, I = would initiate them with a text context: >>=20 >> ---------- >> [text]t_fields=3Did,name[/text] >> [table name=3Dtb_test&fields=3D[t_fields]] >> 1Fred >> 2john >> [/table] >>=20 >> [listwords words=3D[t_fields]] >> [word]
>> [/listwords] >> ---------- >>=20 >>=20 >> Donovan >>=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us >=20 Brian Fries

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:

Can't use old cart file (was One more try) (1997) WYSIWYG Editor? (2006) Duplicate Carts (2000) Help name our technology! I found it (1997) user selectable sort order (2000) numfound question: SORTnumfound=ain't gonna happen (2005) Still having problems with Authen (1997) 2.1.5: Too Many Nested [xxx] (1998) [isfile] ? (1997) sorting on date in search (2000) insecure client not shown (1998) 2 easy questions re: [showif] and [sendmail] (1997) Frames and WebCat (1997) ODBC to WebCat (2000) Showing once on a founditems (1997) 5.0 Pricing (2003) Web Catalog 2 demo (1997) WebCatalog can't find database (1997) 2nd WebCatalog2 Feature Request (1996) Applying discounts as more items are added... (1997)