I have a search engine. I would like to select rows from my table with boolean operations when a user types in a search term. Should I use
explode();
or maybe
split();
?
I would like to use the “OR” operator for selecting the rows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP’s split() function is deprecated. Don’t use it. Instead, try explode(), str_split(), or preg_split().
If you’re using a SQL database, such as MySQL or PostgreSQL, test with UNION and UNION ALL instead of OR. You might be surprised.