Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Richard Halverson

    (@richhalverson)

    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>%’)

    Plugin Author Richard Halverson

    (@richhalverson)

    Please update to version 2.2.1. LIKE is used when you specify the operand in the field specification for the column. For example, [abase table=”table1″ form=”1,search” columns=”name”] will produce an SQL statement with a WHERE clause that searches name exactly: name='<name_value>’. [abase table=”table1″ form=”1,search” columns=”name=%name%”] will produce a WHERE clause that will search name=’%<name_value>%’

    Plugin Author Richard Halverson

    (@richhalverson)

    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.

    Plugin Author Richard Halverson

    (@richhalverson)

    I think your solution works fine. The ABASE short code that produces the form is the same short code that executes the update. Since that short code would be on a page only accessible to a user with authorized access, only a user with authorized access should be able to update the form.

    Thanks for trying ABASE and let me know how it goes!

    Plugin Author Richard Halverson

    (@richhalverson)

    OK I have reconstructed your database. See https://abase.com/abase-help/tosa500/

    The only thing I changed was I made the “name” field in the “class” table a varchar instead of integer.

    Then I inserted a teacher record. Then I inserted a class record. Notice I show the short codes to insert records.

    At the bottom, the short code in purple shows your short code from above. I don’t get the error. I have not been able to replicate your error.

    It is possible you have an older version of ABASE installed. Can you try upgrading and then trying some of the short codes I show on https://abase.com/abase-help/tosa500/

    I have included echo attributes in all the short codes so you can just copy and paste them into your pages.

    Plugin Author Richard Halverson

    (@richhalverson)

    First, can you put the following short codes on a page, view the page and post back what appears?

    [abase sql=”SHOW CREATE TABLE class”]

    [abase sql=”SHOW CREATE TABLE teachers”]

    It looks like you might have set the relations wrong.

    Forum: Plugins
    In reply to: [ABASE] table
    Plugin Author Richard Halverson

    (@richhalverson)

    kairit a select listed is added now when your table column is a foreign key into another table. A drop-down menu will appear for that column in insert and update forms with the first column after the index as the select options. I will add an example in the FAQ section. If you would like more help with this now, post back here or as a new issue that needs to be resolved.

    There is an alink attribute which can be used in a way similar to how rlink is used. What other types of links would you like to be able to specify for a column? I can think of a couple but post back what you had in mind and I can see if I can add it. I will add an example in the FAQ section on the alink attribute also.

    Forum: Plugins
    In reply to: [ABASE] table
    Plugin Author Richard Halverson

    (@richhalverson)

    I have added a notable=”1″ attribute that will not output the beginning and ending TABLE tag for the short code. With notable=”1″ you need to add the beginning and ending TABLE tags manually which means you can define a new table class that specifies column colors as you like.

    You will need to install ABASE upgrade 2.1.3 or higher for the notable=”1″ attribute to work.

    With the upgrade you can specify a class using STYLE tags. Then specify the class name in the TABLE tag. The ABASE short code will only produce the TR rows when notable=”1″, not the enclosing TABLE tags. With both notable=”1″ and notitle=”1″ you the user must also specify the title row manually.

    See https://www.w3.org/Style/Examples/007/evenodd.en.html for examples on defining a class withing STYLE tags and see how to set column colors by defining a class. View the source of this page to see exactly how the class is defined within a STYLE tag.

    It works to specify a new table class within style tags immediately above the ABASE short code. Make sure you are in TEXT mode instead of VISUAL mode when updating the page.

    Forum: Plugins
    In reply to: [ABASE] table
    Plugin Author Richard Halverson

    (@richhalverson)

    I will add a short code attribute for more table formatting flexibility.

    Forms have multiple rows by using more than one short code to make up the form.

    As you know, if you are using only 1 short code to produce the entire form, the form attribute is form=”1,??” where ?? is insert, update or search.

    When using more than one short code, make the FIRST form attribute form=”2,??” and make the LAST form attribute be form=”3,??” (where ?? is insert, update or search).

    In between the first and last short code you can have as many more short codes as you need with the form attribute just form=”??” with no numeric designation.

    Once coded, it is informative to view the HTML source and see the actual form tags and hidden tags that ABASE produces to make sure it all works properly.

    Plugin Author Richard Halverson

    (@richhalverson)

    I installed WordPress on my Windows machine (using XAMPP) and was able to replicate and diagnose the error and fix the code. So I believe the problem of installing on Windows machines has been fixed starting with version 2.0.1.

    Plugin Author Richard Halverson

    (@richhalverson)

    I’m sorry I’m new at this and I just saw our post (4 days later). I can’t seem to replicate the error on Linux. Are you on a Windows machine? I will try installing it on a Windows machine and try to replicate the error.

    To make the Title come from a separate Titles table, create your Titles table so it uses the InnoDB storage engine.

    CREATE TABLE titles (title_id int(11) NOT NULL AUTO_INCREMENT, title_name varchar(50) DEFAULT NULL, PRIMARY KEY (title_id)) ENGINE=InnoDB ;

    Make your employees table InnoDB also and add the column that will contain the foreign key.

    ALTER TABLE employees ENGINE = INNODB ;
    ALTER TABLE employees ADD title_key INT NOT NULL, ADD INDEX ( title_key ) ;

    Finally, set the foreign key relationship.

    ALTER TABLE employees ADD FOREIGN KEY ( title_key ) REFERENCES titles (title_id) ON DELETE RESTRICT ON UPDATE RESTRICT ;

Viewing 11 replies - 1 through 11 (of 11 total)