close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search behavior

Thread began 9/01/2019 1:31 pm by Roxana | Last modified 9/06/2019 1:30 pm by Ray Borduin | 43 views | 12 replies |

Roxana

Search behavior

After MySQLi update the search behavior no longer works (page is blank with no error message).

I suspect the search behavior did not update. In the panel it says "DataAssist Search (Unknown)". When I click the behavior to update, it lets me choose the recordset but then throws an error and does nothing.

Sign in to reply to this post

Roxana

File in PM.

Sign in to reply to this post

Ray BorduinWebAssist

The search code on lines 31 to71 is still mySQL not MySQLi. You may want to delete it and re-apply the mySQLi search code.

You also have a mySQL recordset on lines 166-186 that would need to be updated.

Sign in to reply to this post

Roxana

I have deleted and re-added the search behavior. The page is still blank without a hint what's wrong. The way the page is set up, there is a little search box at the top of every page, that redirects to search.php.

The other recordset does not show up in the behavior panel. I tried deleting the spaces, but it still didn't show up. In the attached file the spaces are not deleted.

Sign in to reply to this post

Ray BorduinWebAssist

Since that recordset code was completely hand coded, it won't be able to be opened and updated through Dreamweaver. You would have to delete it and re-create it from scratch. You can copy the SQL statement and paste it into a new recordset SQL pane using the Advanced Recordset dialog.

Sign in to reply to this post

Roxana

I should have thought of that. It's done, but the page is still blank.

Sign in to reply to this post

Ray BorduinWebAssist

This code:

php:
<?php

$rsCountryDetection 
= new WA_MySQLi_RS("rsCountryDetection",$connSegufixNew,1);
$rsCountryDetection->setQuery("SELECT                  c.hide_button, c.country              FROM                  ip2nationCountries c,                 ip2nation i              WHERE                  i.ip < INET_ATON("' . $_SERVER['REMOTE_ADDR'] . '")                  AND                  c.code = i.country              ORDER BY                  i.ip DESC              LIMIT 0,1'");
$rsCountryDetection->execute();
?>


should be:

php:
<?php

$rsCountryDetection 
= new WA_MySQLi_RS("rsCountryDetection",$connSegufixNew,1);
$rsCountryDetection->setQuery("SELECT c.hide_button, c.country FROM ip2nationCountries c, ip2nation i WHERE i.ip < INET_ATON(?) AND c.code = i.country ORDER BY i.ip DESC LIMIT 0,1'");
$rsCountryDetection->bindParam("s""".($_SERVER['REMOTE_ADDR'])  ."""-1"); //varRemoteAddr
$rsCountryDetection->execute();
?>
<?php
$hide_button 
$rsCountryDetection->getColumnVal("hide_button");
$countryName $rsCountryDetection->getColumnVal("country");
?>
Sign in to reply to this post

Roxana

This post has been deleted.

Roxana

I have updated the search behavior. All is looking good except for one issue.

The search returns all recordsets instead of a meaningful result. If I search for an item no., it returns all items. The behavior looks like this:

<?php
$searchRecordset1_1 = new WA_MySQLi_Search("Recordset1","");
if ((((isset($_POST["WADbSearch1"]))?$_POST["WADbSearch1"]:"") != "")) {
$searchRecordset1_1->clearSearch();
$searchRecordset1_1->setSearch(array("type"=>"Key", "comparison"=>"=", "join"=>"AND", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("item_no_short", "item_no_short_2", "item_no_short_3", "item_no_short_4", "item_no_short_5", "name", "application", "application2", "application3", "application4", "application5", "application6", "info1", "info2", "info3", "info4", "info5", "info6", "contents", "contents2", "contents3", "contents4", "contents5", "contents6"), "s", "");
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

Line 34 you have:

php:
$searchRecordset1_1->setSearch(array("type"=>"Key", "comparison"=>"=", "join"=>"AND", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("item_no_short", "item_no_short_2", "item_no_short_3", "item_no_short_4", "item_no_short_5", "name", "application", "application2", "application3", "application4", "application5", "application6", "info1", "info2", "info3", "info4", "info5", "info6", "contents", "contents2", "contents3", "contents4", "contents5", "contents6"), "s", "");


You should have:

php:
$searchRecordset1_1->setSearch(array("type"=>"Key", "comparison"=>"=", "join"=>"AND", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("item_no_short", "item_no_short_2", "item_no_short_3", "item_no_short_4", "item_no_short_5", "name", "application", "application2", "application3", "application4", "application5", "application6", "info1", "info2", "info3", "info4", "info5", "info6", "contents", "contents2", "contents3", "contents4", "contents5", "contents6"), "s", "".($_POST["search"])  ."");
Sign in to reply to this post
loading

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