close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

WADA Search error - checkbox??

Thread began 9/14/2010 6:09 am by steve287725 | Last modified 9/14/2010 10:26 am by Jason Byrnes | 729 views | 4 replies |

steve287725

WADA Search error - checkbox??

Hello there - hope you can help.

I am using DataAssist 2.06 and I am getting an error when I use a checkbox field using DataAssist Search - the field is set up OK on the search page and it has a static checked value of 1.
The database is MySQL and the field is a TINYINT with a length of 1 - values 1 for true, 0 for false,
All the fields have values in them.
If the checkbox is NOT checked all is OK and all the records return on the results page.
If the checkbox IS checked then I always get the following;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show = 1) ORDER BY full_item_details.category_description ASC LIMIT 0, 10' at line 1

I attached the checkbox setup.
It does not seem to make any difference as to whether I inset a value in the second field 'setup' box or not.

The code in the page header is;

//comparison list additions
$WADbSearch1->addComparisonFromEdit("UID","S_UID","AND","=",1);
$WADbSearch1->addComparisonFromEdit("toyname","S_toyname","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("category","S_category","AND","=",1);
$WADbSearch1->addComparisonFromEdit("agerange","S_agerange","AND","=",1);
$WADbSearch1->addComparisonFromCheck("show","S_show","1","","AND","=","=",1);


Can you please shed any light on this?

Many thanks

Steve

Sign in to reply to this post

Dave BuchholzBeta Tester

Steve,

the following line of code

Originally Said By: steve287725
  $WADbSearch1->addComparisonFromCheck("show","S_show","1","","AND","=","=",1);  



should read

$WADbSearch1->addComparisonFromEdit("show","S_show","AND","=",1);



for the search to work with a checkbox

Sign in to reply to this post

steve287725

Hello - thanks for that but I have already tried this, however here is the new code;

$WADbSearch1->addComparisonFromEdit("show","S_show","AND","=",1);

Still get this when the box is checked with a value of 1;

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show = 1) ORDER BY full_item_details.category_description ASC LIMIT 0, 10' at line 1"

If it helps here is the string from the address bar;

http://localhost/<sitename>/admin/full_item_details_Results.php?S_UID=&S_toyname=&S_show=1&S_category=&S_agerange=&WADbSearch1=Submit&Search.x=43&Search.y=10[/url]

This seems OK to me?

Thanks

Steve

Sign in to reply to this post

Dave BuchholzBeta Tester

Steve,

all I can say is that the code I gave you works for me every time, there must be an error somewhere but without going through the whole thing with you, which I don't have time to do at the moment, I can't help you any more.

Perhaps one of the WA techies can shed some light on this for you.

Sorry I can't be of more help.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page in a zip archive so I can examine the entire page code.

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...