本文整理汇总了PHP中Results::get_num_rows方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::get_num_rows方法的具体用法?PHP Results::get_num_rows怎么用?PHP Results::get_num_rows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results::get_num_rows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
* Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
*
* @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
*
* @package admin
*
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
* @author efy-asimo: Attila Simo.
*
* @version $Id: _broken_posts.view.php 3328 2013-03-26 11:44:11Z yura $
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
$SQL = new SQL();
$SQL->SELECT('post_ID, post_title, post_main_cat_ID, post_canonical_slug_ID');
$SQL->FROM('T_items__item');
$SQL->WHERE('post_main_cat_ID NOT IN (SELECT cat_ID FROM T_categories )');
$Results = new Results($SQL->get(), 'broken_posts_');
$Results->title = T_('Broken items with no matching category');
$Results->global_icon(T_('Cancel!'), 'close', regenerate_url('action'));
$Results->cols[] = array('th' => T_('Item ID'), 'th_class' => 'shrinkwrap', 'td_class' => 'small center', 'order' => 'post_ID', 'td' => '$post_ID$');
$Results->cols[] = array('th' => T_('Title'), 'th_class' => 'nowrap', 'order' => 'post_title', 'td' => '$post_title$', 'td_class' => 'small');
$Results->cols[] = array('th' => T_('Main Cat ID'), 'th_class' => 'shrinkwrap', 'order' => 'post_main_cat_ID', 'td' => '$post_main_cat_ID$', 'td_class' => 'small center');
$Results->cols[] = array('th' => T_('Canoncical Slug ID'), 'th_class' => 'shrinkwrap', 'order' => 'post_canonical_slug_ID', 'td' => '$post_canonical_slug_ID$', 'td_class' => 'small center');
$Results->display(array('page_url' => regenerate_url('blog,ctrl,action,results_' . $Results->param_prefix . 'page', 'action=' . param_action() . '&' . url_crumb('tools'))));
if ($current_User->check_perm('options', 'edit', true) && $Results->get_num_rows()) {
// display Delete link
$redirect_to = regenerate_url('action', 'action=del_broken_posts&' . url_crumb('tools'));
echo '<p>[<a href="' . $redirect_to . '">' . T_('Delete these posts') . '</a>]</p>';
}