You wrote:
---
The form action template:
SELECT Joke
FROM WordJokes
WHERE JokeTitle=JokeTitle
---
Try:
SELECT Joke
FROM WordJokes
WHERE JokeID IN (#Form.a#)
And I'd rename the Selects from "a" to something more meaningful like
"JokeID"
___
tho 5 were chosen in the joke form. Please advise what I
> should do.
> Thanks.
>
> Hubert
> - Original Message -
> From: Daniel Wm Brick III <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 25, 2000 8:56 AM
> Subject: RE: Problem
Send a copy of the code of both templates and Ill take a look at it.
Cheers
Taz
- - - - - - - - - - - - - - - - - - - - -
Chris Tazewell
Technical Web Developer
QSP Net Consulting
www.qsp.co.uk
Tel: +44 (0)191 4023125
Fax +44 (0)191 4023344
icq: 38478683
> It works better, but it only returns
ay, April 25, 2000 7:20 AM
Subject: Re: Problem controlling output
>
> Hello Hubert,
>
> you might change your query. The old query just gives you all
> jokes, but you only want the 5 jokes, selected in the form
>
> > > DATASOURCE="Jokes"
> NAME="
l 25, 2000 8:56 AM
Subject: RE: Problem controlling output
> The name of the field returned by your SELECT statements is 'a', not
> 'JokeTitle'.
> Since all of your SELECT statements are named 'a', then your values will
be
> returned in FORM.a as a list of
The name of the field returned by your SELECT statements is 'a', not
'JokeTitle'.
Since all of your SELECT statements are named 'a', then your values will be
returned in FORM.a as a list of JokeIDs.
In other words, FORM.a will be '1,3,9,15,4' or something similar.
In order to output a joke for eac
Hello Hubert,
you might change your query. The old query just gives you all
jokes, but you only want the 5 jokes, selected in the form
> DATASOURCE="Jokes"
NAME="JokeData">>
> SELECT Joke
> FROM WordJokes
> WHERE JokeTitle=JokeTitle
>
You are not using any variable coming from your form... Y
You're getting all jokes because your where clause, "WHERE
JokeTitle=JokeTitle", is always true. You need to compare a database
field to a CF variable representing the user's choices. The Select
passes JokeID's to the action template (not JokeTitles), so you'd need
WHERE JokeID in (#JokeID#)
Hubert,
Since I don't have a database with more than five jokes in it to test this
against, I do not guarantee that it will work, this was just the answer that
broke through my caffeine-sugar buzz... ;). Besides, it's 5 AM, for Christ's
sake--what are we still doing on the list?
I would say the
Hi Hubert,
>I'm having a problem controlling the output of a form. .
>
>form, in part:
>
>Joke title #5:
>
>
>
>#JokeTitle#
>
>
>
>The form action template:
>
>DATASOURCE="Jokes"
>NAME="JokeData">
>SELECT Joke
>FROM WordJokes
>WHERE JokeTitle=JokeTitle
>
The query should be:
SEL
1.First of all chk out ur query in the action page.
It should be jokeId not joke title.
2.The where clause cannot receive multiple values (in this case 5 id's)
so try out between
KC
--
Archives: http://www.eGroups.com/li
11 matches
Mail list logo