WordPress.org

Ready to get started?Download WordPress

Forums

ABASE
[resolved] LIKE rather than EQUALS (5 posts)

  1. ImplexSQL
    Member
    Posted 10 months 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.

    http://wordpress.org/plugins/abase/

  2. Richard Halverson
    Member
    Plugin Author

    Posted 9 months 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
    Member
    Posted 9 months ago #

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

  4. Richard Halverson
    Member
    Plugin Author

    Posted 8 months 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
    Member
    Posted 8 months 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"]

Reply

You must log in to post.

About this Plugin

About this Topic