2
我想只顯示帶有的文字 4個字符,實際上我可以限制匹配並只顯示最小的單詞。 100次點擊 - 但我怎樣才能設置分鐘。字符長度?謝謝!最少4個字符或者什麼都不顯示 - PHP
function sm_list_recent_searches($before = '', $after = '', $count = 20) {
// List the most recent successful searches.
global $wpdb, $table_prefix;
$count = intval($count);
$results = $wpdb->get_results(
"SELECT `terms`, `datetime`
FROM `{$table_prefix}searchmeter_recent`
WHERE 100 < `hits`
ORDER BY `datetime` DESC
LIMIT $count");
if (count($results)) {
foreach ($results as $result) {
echo '<a href="'. get_settings('home') . '/search/' . urlencode($result->terms) . '">'. htmlspecialchars($result->terms) .'</a>'.", ";
}
}
}
plussing這一點,因爲它是第一個和我一個字符串與char_length混合在一起 – Gordon 2010-03-16 14:08:01