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

Msqli server behavior with multiple keywords search.

Thread began 3/14/2020 8:14 am by nd.lamine430647 | Last modified 3/20/2020 10:15 am by nd.lamine430647 | 417 views | 35 replies

Ray BorduinWebAssist

The search feature in DataBridge is much more complete. It handles things like repeat spaces, grouping with quotes, AND or OR type searches and it is more efficient in the query building. However a quick and dirty hand coded version might look like:


= array();
if (isset(
$_GET["keywords"])) {
$keyArr explode($_GET["keywords"]," ");
= new WA_MySQLi_RS("ApplicantProfile",$conn_i,30);
$ApplicantProfile->setQuery("SELECT, infos.nom, infos.prenom, infos.niveau, infos.localisation, infos.pays, infos.secteur1, infos.secteur2, infos.secteur3,, infos.titre_cv1, infos.cv1, infos.langue_cv1, infos.dip1, infos.obtention1, infos.fichier1, infos.dip2, infos.obtention2, infos.fichier2, infos.dip3, infos.obtention3, infos.fichier3, infos.Statut, flag1.flag AS fl1, flag2.flag AS fl2 FROM infos, (select * from pays_world) AS flag1, (select * from pays_world) AS flag2 WHERE infos.Statut = 'APPROVED' AND infos.localisation=CONCAT(,' - ',flag1.en) AND infos.pays=CONCAT(,' - ',flag2.en)");
if (
sizeof($keyArr) > 0$ApplicantProfile->Statement .= " AND (";
for (
$x=0$x<sizeof($keyArr); $x++) {
    if (
$x>0$ApplicantProfile->Statement .= " OR ";
$ApplicantProfile->Statement .= "(CONCAT(,' ', infos.nom, ' ', infos.prenom, ' ', infos.niveau, ' ', infos.localisation, ' ', infos.pays, ' ', infos.secteur1, ' ', infos.secteur2, ' ', infos.secteur3, ' ', infos.titre_cv1, ' ', infos.Statut) LIKE ?)";
$ApplicantProfile->bindParam("c""".($keyArr[$x])  .""""); //colname
if (
sizeof($keyArr) > 0$ApplicantProfile->Statement .= ")";

Did this help? Tips are appreciated...

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





Ease of use


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