Re: Dropdown Building Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aaron,
Thanks for showing me this it is very cool indeed.

However maybe I am being dumb and obdurate but what I am really trying to do is build some of these things myself (with, thankfully, help) so that I understand enough that when I see a great tool like yours I'll actually appreciate what it's doing for me. I can see that your tool is doing everything in one line, and I think its really great. I just am such a beginner that I think tools like that would encourage me to *never* get above this level I'm at now.

I got the questions and answers thing working, starting with Kristen's two-query code and moving from there. I would like to come back to see how it can be done with one query and one function, but at this point my eyes are so bleary I'm grateful for the fact that I can now focus on getting the form to process!

Thanks again

JJ

Aaron Greenspan wrote:
Jay,

This is why I think frameworks are helpful Here's how I'd do it with Lampshade in one line of code with my own hypothetical field names:

dropdownBox('answerid', "SELECT answerid, CONCAT(questions.description,' - ',answers.description) AS display FROM questions LEFT JOIN answers ON questions.questionid=answers.questionid ORDER BY questions.description, answers.description", $myrow['answerid'], 'Question and Answer', 'Choose an Answer');

For more information on this function:

http://www.thinkcomputer.com/software/lampshade/documentation.html?function=dropdownBox

I'd be happy to help you get it set up if you have any questions.

Aaron

Aaron Greenspan
President & CEO
Think Computer Corporation

http://www.thinkcomputer.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux