close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Apostrophe in keyword search

Thread began 4/02/2013 10:00 am by stephen287384 | Last modified 4/03/2013 6:13 am by Jason Byrnes | 1402 views | 4 replies |

stephen287384

Apostrophe in keyword search

I am having some issues with a DataAssist form i have created. For example, when i enter a keyword with an apostrophy in it eg: Mick's, no results show up, however if i search for Mick the results are displayed and one of the results is Mick's?

//keyword array declarations
$KeyArr1 = array("category", "business");
$KeyArr2 = array("suburb", "postcode");

//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["what"]))?$_POST["what"]:"") ."","OR","Includes","AND",",%20","%22","%22",0);
$WADbSearch1->keywordComparison($KeyArr2,"".((isset($_POST["area"]))?$_POST["area"]:"") ."","AND","=","%20AND%20",",%20","%22","%22",0);

Sign in to reply to this post

Jason ByrnesWebAssist

could be that GPC Magic Quotes is enabled on the server, so Mike's is being converted to Mike\'s

try changing:

php:
//comparison list additions

$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["what"]))?$_POST["what"]:"") ."","OR","Includes","AND",",%20","%22","%22",0) ;
$WADbSearch1->keywordComparison($KeyArr2,"".((isset($_POST["area"]))?$_POST["area"]:"") ."","AND","=","%20AND%20",",%20","%22","%22",0) ;



to:

php:
//comparison list additions

$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["what"]))?stripslashes($_POST["what"]):"") ."","OR","Includes","AND",",%20","%22","%22",0) ;
$WADbSearch1->keywordComparison($KeyArr2,"".((isset($_POST["area"]))?stripslashes($_POST["area"]):"") ."","AND","=","%20AND%20",",%20","%22","%22",0) ;
Sign in to reply to this post

stephen287384

OK tried that, made no difference. The strange thing is if i search for Mick the results page shows the results but the apostrophe is a black diamond. If i refresh the results page (in Firefox), the diamonds then display correctly as apostrophes.

Hmmmm.....just checked Internet Explorer and the apostrophes show as boxes on the results page and don't change when i refresh the page.


Checked the database and the records look correct, the doctype is:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

Also database collation set to latin1_swedish_ci

Sign in to reply to this post

stephen287384

After applying your code i am now getting a popup message when i try and enter the DA Search Server Behaviour, see attached.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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