Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/10/2020 in all areas

  1. You asked what the problem may be. That is my answer based on the code, details and error messages you posted.
    1 point
  2. Does this do it for you? wp_wpforms_entry_fields: +----------+----------+--------------------+ | entry_id | field_id | value | +----------+----------+--------------------+ | 1 | 5 | Laura Norder | | 1 | 13 | School A | | 1 | 16 | Belt 1 | | 1 | 18 | Sparring - $75.00 | | 2 | 5 | Peter Dowt | | 2 | 13 | School B | | 2 | 16 | Belt 2 | | 2 | 18 | Sparring - $90.00 | | 2 | 43 | Belt 3 | | 3 | 5 | Tom Dicanari | | 3 | 13 | School C | | 3 | 16 | mmm | | 3 | 18 | Soarring - $100.00 | | 3 | 43 | kkk | | 4 | 5 | Joe King | | 4 | 13 | School D | | 4 | 16 | Belt 4 | | 4 | 18 | Sparring - $150.00 | | 4 | 43 | sss | +----------+----------+--------------------+ mysql> SELECT entry_id -> , field_id -> , CASE field_id -> WHEN 5 THEN CONCAT(SUBSTRING_INDEX(value, ' ',1), ' ', LEFT(SUBSTRING_INDEX(value,' ', -1), 1)) -> WHEN 18 THEN TRIM(SUBSTRING_INDEX(value, '-', 1)) -> ELSE value -> END as value -> FROM wp_wpforms_entry_fields -> WHERE field_id IN (5, 13, 16, 18) -> ORDER BY entry_id; Query results: +----------+----------+----------+ | entry_id | field_id | value | +----------+----------+----------+ | 1 | 5 | Laura N | | 1 | 13 | School A | | 1 | 16 | Belt 1 | | 1 | 18 | Sparring | | 2 | 5 | Peter D | | 2 | 13 | School B | | 2 | 16 | Belt 2 | | 2 | 18 | Sparring | | 3 | 5 | Tom D | | 3 | 13 | School C | | 3 | 16 | mmm | | 3 | 18 | Soarring | | 4 | 5 | Joe K | | 4 | 13 | School D | | 4 | 16 | Belt 4 | | 4 | 18 | Sparring | +----------+----------+----------+
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.