[resolved] LIKE rather than EQUALS (5 posts)

  1. ImplexSQL
    Posted 1 year ago #

    I have successfully created a search form using ABASE. I seek assistance with the following:
    - have the WHERE use LIKE rather than = (to use LIKE with the % qualifiers)
    - have just one search box that searches multiple fields rather than one search box per field to search
    - have a result set that uses more fields than those searched

    Thank you for your assistance.


  2. Richard Halverson
    Plugin Author

    Posted 1 year ago #

    Regarding your first question, to search using % qualifiers, you do the following: For example, to search a field "description" without %, your short code could be:

    [abase table="calls" form="1,search" columns="description"]

    To use % on both sides you could use:

    [abase table="calls" form="1,search" columns="description=%description%"]

    I have a fix for searching multiple fields with a single search box. It will be available with the next update in the next day or two.

  3. kellmb
    Posted 1 year ago #

    Fantastic! Thank you - as I said in the other topic, great plugin :)

  4. Richard Halverson
    Plugin Author

    Posted 1 year ago #

    You can search multiple fields now by adding an or="field1|field2" in the short code. For example: [abase table="table1" form="1,search" columns="first_name=%first_name%"] will produce an SQL statement SELECT * FROM table1 WHERE first_name='%<first_name>%'. However, [abase table="table1" columns="first_name=%first_name%" or="first_name|last_name"] will produce an SQL statement SELECT * FROM table1 WHERE (first_name='%<first_name>%' OR last_name='%<first_name>%')

  5. khalid khan khayam
    Posted 1 year ago #

    Dear Mr. Richard Halverson Thank you for your support, you help me as well alot,i am new to wordpress

    but i have some problem, i creat a database with paper Title and Paper file in pdf format, it works well i upload a file successfully but when i open a search page and search that file it gives me results but to download that pdf file again it gives me that same page again and again and cant download pdf file, kindly help me

    my search code is given below:

    [abase form="1,search" table="main" columns="Title=%Title%$Search" elements="Title"]

    [abase table="main" columns="ID,Title,Paper" rlink="Paper"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic