Vairable Query of TinyTables
Friends, Humans, Zopians..lend me your ears: Has anyone had any luck inserting a variable into the "query" string of TinyTables. A thousand thanks to Ty Sarna for the Product by the way! Trying to customize documents based on user. A User object has no extra info, so I put the extra static properties into a TinyTable and want to get them out base on who is loged in. By variable query I mean for example: <!--#var standard_html_header--> <!--#in "recruiter_data(AUTHENTICATED_USER)"--> <!--#var wagner--><br> <!--#/in--> <!--#var standard_html_footer--> Believe it or not, it doesn't choke, it just gives me nothing. I alos tried this <!--#var standard_html_header--> <!--#in "recruiter_data(_[AUTHENTICATED_USER])"--> <!--#var wagner--><br> <!--#/in--> <!--#var standard_html_footer--> but that choked and there is no traceback in the HTML source. Anybody try this yet? All the best, Jason Spisak webmaster@mtear.com
At 22:59 09/03/99 , Jason Spisak wrote:
By variable query I mean for example:
<!--#var standard_html_header--> <!--#in "recruiter_data(AUTHENTICATED_USER)"--> <!--#var wagner--><br> <!--#/in--> <!--#var standard_html_footer-->
Believe it or not, it doesn't choke, it just gives me nothing.
TinyTables act like dictionary objects I think, and are keyed on strings. AUTHENTICATED_USER is not a string, but an object, so you'll have to convert it. Try calling AUTHENTICATED_USER.getUserName() instead. -- M.J. Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
Jason Spisak wrote:
Has anyone had any luck inserting a variable into the "query" string TinyTables. A thousand thanks to Ty Sarna for the Product by the way!
You're welcome! Glad others are finding it useful. Stay tuned for thr read/write capale version... In article <4.1.19990310100907.00bd7100@lisp.atmm.nl>, Martijn Pieters <mj@antraciet.nl> wrote:
TinyTables act like dictionary objects I think, and are keyed on strings.
This form of query acts like a dictionary lookup, yes (always returns either 0 or 1 rows). It's keyed on whatever type the first column is. So, if the first column is a string, you need to lookup with a string, or you won't get a match.
AUTHENTICATED_USER is not a string, but an object, so you'll have to convert it. Try calling AUTHENTICATED_USER.getUserName() instead.
That should do it.
participants (3)
-
Jason Spisak -
Martijn Pieters -
tsarnaļ¼ endicor.com