close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Listbox value in where clause

Thread began 3/07/2011 9:18 am by tom.kurshinsky298027 | Last modified 3/09/2011 10:53 am by Jason Byrnes | 2199 views | 7 replies |

tom.kurshinsky298027

Listbox value in where clause

Hi,

I have used DA to set up my results page as normal. Now I want to do this:

I have a start.html
On that page is a list box that grabs and groups data from one field in my database so I have a list. The list box is named SelectTech. This is working fine

On the results.html I want to add the listbox value to my where clause. The page comes up but with no data, but in the URL I can see the value
ww.mysite.com/drill/Tdrill_ResultsDynamic.php?SelectTech=1&TechButton=Submit

SelectTech= 1

In this case, 1 should be whats in the where clause. It doesn't seem to be pulling only the 1 out.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

On the results page, edit the reocrdset.


In the filtering section, select the column you wish to filter, set it to a Query Sting variable and enter the name:
SelectTech

Sign in to reply to this post

tom.kurshinsky298027

Thanks for the help.

I tried adding it a variable and am now getting the error message: Parse error: syntax error, unexpected '=', expecting ',' or ')' in . . . line 98

which is

$SelectTech_WADATdrill = (get_magic_quotes_gpc()) ? #SelectTech# : addslashes(#SelectTech#);

The URL is:
start.php

use the drop down list.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a screen shot showing how you configured this in the recordset dialog box?

Sign in to reply to this post

tom.kurshinsky298027

Here you go. Also a strange thing. In the SQL the SelectTech in the where clause keeps changing to SELECT Tech

Sign in to reply to this post

Jason ByrnesWebAssist

1) In the where clause you have:

WHERE Tdril.techid = SELECT Tech




this is wrong for 2 reasons: a) you cannot use the sql keyword "SELECT" in the where clause and b) The actual name of the parameter is "SelectTech"

the where clause should be:

WHERE Tdril.techid = SelectTech




2) for the runtime value of the SelectTech parameter, you entered:
#SelectTech#


this is not a valid php variable. the run time value should be:
$_GET['SelectTech']

Sign in to reply to this post

tom.kurshinsky298027

That was it. Thanks very much!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...