Data from Microsoft SQL using ZPT - with querystrings?

3 Messages Forum Options Options
Embed this topic
Permalink
steven shade
Data from Microsoft SQL using ZPT - with querystrings?
Reply Threaded MoreMore options
Print post
Permalink
Hi

I am able to extract and display results from sql using parameterised queries coming from a form.
However I'm not sure whats the best way to do this using querystrings?

Scenario:
I have a search form which once submitted displays a list of records based on criteria input by the user.
On the reults page I want to add a hyperlink to each record which will link to another page (displaying the extended results of that record).

So on my first results page I have:
<div metal:fill-slot="main" tal:define="results here/sql_SearchEmployeeName">

Which takes the values posted into the query and shows the results.
I then have a link on the results as follows:
<a tal:attributes="href string:employee_details?id=${result/employeeid}">

How do I pass this parameter into a query like the first results page?
I know how to grab the request (strID request/form/id) but dont know how to pass it to the query.

Can anyone help
Thanks
Steven

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Dieter Maurer
Re: Data from Microsoft SQL using ZPT - with querystrings?
Reply Threaded MoreMore options
Print post
Permalink
steven shade wrote at 2008-8-22 10:22 +0100:
> ...
>I am able to extract and display results from sql using parameterised
>queries coming from a form.
>However I'm not sure whats the best way to do this using querystrings?

The query string will be parsed for you and the result will
be as if the parameters had come from a form.
Thus, you need not to worry.



--
Dieter

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
steven shade
Re: Data from Microsoft SQL using ZPT - with querystrings?
Reply Threaded MoreMore options
Print post
Permalink
Thanks for the info, I have now got this working.

On Sat, Aug 23, 2008 at 1:25 PM, Dieter Maurer <dieter@...> wrote:
steven shade wrote at 2008-8-22 10:22 +0100:
> ...
>I am able to extract and display results from sql using parameterised
>queries coming from a form.
>However I'm not sure whats the best way to do this using querystrings?

The query string will be parsed for you and the result will
be as if the parameters had come from a form.
Thus, you need not to worry.



--
Dieter


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users