Andreas Hallenberg Posted April 14, 2025 Report Share Posted April 14, 2025 Hi, I've been using an asterisk symbol to indicate which of multiple first names is the primary first name, for example, Karl* Emil Johansson. However, if I search for the name in the search form using "First name: Karl Emil" and "Last name: Johansson" (without the asterisk), the search function doesn't find the person. Interestingly, the search does work if I search using only the primary first name (the one originally marked with the asterisk) and the last name – for example, searching for "First name: Karl" and "Last name: Johansson" does find the person. This seems to indicate that the search function might be able to handle the stored asterisk correctly when only the primary name is searched, but it fails when trying to match both first names if the asterisk isn't included in the search terms. Is there any way to fix this behavior so that searching for "Karl Emil Johansson" also finds the entry "Karl* Emil Johansson"? Best regards, Andreas Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted April 14, 2025 Report Share Posted April 14, 2025 Andreas, What happens if you use "Soundex of" or "Metaphone of" as a search parameter? Quote Link to comment Share on other sites More sharing options...
Leif Sweden Posted April 14, 2025 Report Share Posted April 14, 2025 I use capital letters for the primary first name (KARL Emil Johansson) which works fine when searching etc. Quote Link to comment Share on other sites More sharing options...
Andreas Hallenberg Posted April 14, 2025 Author Report Share Posted April 14, 2025 4 hours ago, Rob Severijns said: Andreas, What happens if you use "Soundex of" or "Metaphone of" as a search parameter? Unfortunately no, I tried it but it still doesn't work. Thanks for the tip though. Quote Link to comment Share on other sites More sharing options...
Andreas Hallenberg Posted April 14, 2025 Author Report Share Posted April 14, 2025 3 hours ago, Leif Sweden said: I use capital letters for the primary first name (KARL Emil Johansson) which works fine when searching etc. Thanks for the suggestions, and yes, that could have been an option if I'd thought of it sooner. Now I've used the asterisk solution on too many people to change it for everyone. Quote Link to comment Share on other sites More sharing options...
Leif Sweden Posted April 14, 2025 Report Share Posted April 14, 2025 1 hour ago, Andreas Hallenberg said: Thanks for the suggestions, and yes, that could have been an option if I'd thought of it sooner. Now I've used the asterisk solution on too many people to change it for everyone. I understand Quote Link to comment Share on other sites More sharing options...
GOGGS Posted April 14, 2025 Report Share Posted April 14, 2025 A couple of options 1. You could use a query from phpMyAdmin to change all the names at once, replacing anything with an asterisk with the same minus the asterisk and all in CAPS, or 2. Since the asterisk char is a special one in SQL, that's likely your issue. To overcome, search for: karl% emil the % char in SQL is a placeholder that means any or no character in that position. GOGGS Quote Link to comment Share on other sites More sharing options...
Andreas Hallenberg Posted April 14, 2025 Author Report Share Posted April 14, 2025 2 hours ago, GOGGS said: A couple of options 1. You could use a query from phpMyAdmin to change all the names at once, replacing anything with an asterisk with the same minus the asterisk and all in CAPS, or 2. Since the asterisk char is a special one in SQL, that's likely your issue. To overcome, search for: karl% emil the % char in SQL is a placeholder that means any or no character in that position. GOGGS Thanks for your response and suggestions. Using SQL proved to be a good idea. I tried it, and it solved everything! Going forward, I'll capitalize the first names from the start. 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.