- 1
- 2
- 3
// генерируем 2 раз для лучшей случайности
$wpdb->get_results('SELECT id FROM ' . $table_prefix . 'another_random_quote WHERE tag="'.$tag.'" ORDER BY RAND() LIMIT 1');
$quotes = $wpdb->get_results('SELECT * FROM ' . $table_prefix . 'another_random_quote WHERE tag="'.$tag.'" ORDER BY RAND() LIMIT ' . intval($amount));
guest 12.11.2009 09:10 # 0
sudden_def 12.11.2009 10:39 # 0
xaionaro 12.11.2009 19:30 # 0
Oleg_quadro 12.11.2009 19:31 # +1
guest 12.11.2009 21:01 # +1
guest 13.11.2009 13:47 # −1
junqed 13.11.2009 14:42 # 0