steve_large Posted April 10, 2020 Author Share Posted April 10, 2020 Hi Barry, Just getting back at it now. The quad replace was to cut all of the prices off of the end of the events. The tournament organizers didn't want people to publicly see what others had paid for events especially when we had different prices for early bird applications. Also, there needed to be last initial only on the names because of wanting to have privacy for the applicants. I tried your code and it worked fine for 18 but 5 remained unaffected. Could be because I have that join in there somehow. This seemed to be the problem that I had been having before. I need the join in order to restrict people on the list to only the people who's PayPal transactions have completed. Here is the whole thing SELECT e.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 f JOIN wp_wpforms_entries e ON f.entry_id = e.entry_id WHERE field_id IN (5,16,13,18) AND e.status='completed' ORDER BY e.entry_id DESC; as I have inserted your code below. Did I make a mistake or typo somewhere? Steve Quote Link to comment Share on other sites More sharing options...
steve_large Posted April 10, 2020 Author Share Posted April 10, 2020 Hi Barry, OOPs! My bad. Must have been a cut and paste error. Everything seems to be working now. There are no middle names though as I guess you can't really include that as it is a variable thing. Tried using Stephen William Large and got Stephen L. Great stuff anyway as I could never seem to get both things working at the same time and my names would come out as Stephen W. Instead. Thanks, Steve Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.