0

I need a search template for my custom table in my wordpress.

It should be one searchform and this searchform should search all entries using the "LIKE" option.

The table in my wordpress db has 5 columns, "id,date,name,from,txt".

If I type "alexandera" in the search form, for example, the form should search all entries and give the results in a table like with 20 results per site

| id | date | name | from | txt | |----|------|------|------|-----| | 1 | 2021-01-01 | Alexander | Bank | Mail of Bank ... | | 30 | 2021-05-01 | Alexander | Bank | Mail of Bank ...| etc

or if I type Bank, it should return | id | date | name | from | txt | |----|------|------|------|-----| | 1 | 2021-01-01 | Alexander | Bank | Mail of Bank | | 30 | 2021-05-01 | Alexander | Bank | Mail of Bank | etc

Thanks

1 Answer 1

0

You should use a wpdb object in PHP. Its usage is explained in manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.