How could I make simple row selections from a database with Boole operations?
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.
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.
精彩评论