本文整理汇总了PHP中SearchHandler::getDBinstance方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchHandler::getDBinstance方法的具体用法?PHP SearchHandler::getDBinstance怎么用?PHP SearchHandler::getDBinstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchHandler
的用法示例。
在下文中一共展示了SearchHandler::getDBinstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIDWords
public static function getIDWords($MxWord, $BoValidate = TRUE)
{
#
# If needs validate, we've understand that the default argument has given
# Then, we expected a simple text (string).
#
if (!empty($BoValidate)) {
self::$StText = $MxWord;
self::WordExplode();
self::WordValidate();
$ArWord = self::$ArWord;
self::reset();
unset($MxWord);
} else {
#
# Otherwise, we expect an array. Probably, in this case, the method
# has been called from own object
#
$ArWord = (array) $MxWord;
unset($MxWord);
}
if (empty($ArWord) || !is_array($ArWord)) {
return array();
}
$ArWordDB = array();
$ArIDWord = array();
$StIN = "'" . implode("' , '", $ArWord) . "'";
$StSQL = "SELECT IDWord\n FROM Word \n WHERE \n StWord IN ({$StIN})\n ORDER BY \n ItCount DESC\n LIMIT 1000;";
SearchHandler::getDBinstance();
SearchHandler::$DBHandler->execSQL($StSQL);
$ArResult = SearchHandler::$DBHandler->getResult("string");
foreach ((array) $ArResult as $Row) {
$ArIDWord[] = $Row['IDWord'];
}
self::$ArIDWord = $ArIDWord;
return $ArIDWord;
}