开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜