當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wpdb::get_col_info方法代碼示例

本文整理匯總了PHP中wpdb::get_col_info方法的典型用法代碼示例。如果您正苦於以下問題:PHP wpdb::get_col_info方法的具體用法?PHP wpdb::get_col_info怎麽用?PHP wpdb::get_col_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在wpdb的用法示例。


在下文中一共展示了wpdb::get_col_info方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: pagination

 } else {
     //Page navigation
     $pagination = new pagination();
     $pagination->set_pagination_tpl_path($wpbi_url['tpl']);
     $pagination->set_pg_interval($wpbi_settings['parameter']['page-interval']);
     $pagination->set_pg_parameter('paged');
     $pagination->set_current_page(isset($_GET[$pagination->pg_parameter]) ? abs((int) $_GET[$pagination->pg_parameter]) : 1);
     $pagination->set_rows($total_rows);
     $pagination->set_css_class('widefat');
     $pagination->set_pagination_stats($wpbi_dialog['table']['pagination']['stats']);
     $pagination->set_paginate_links(paginate_links(array('base' => esc_url(add_query_arg($pagination->pg_parameter, '%#%')), 'format' => '', 'prev_text' => $wpbi_dialog['table']['pagination']['prev_text'], 'next_text' => $wpbi_dialog['table']['pagination']['next_text'], 'total' => ceil($pagination->rows / $pagination->pg_interval), 'current' => $pagination->current_page)));
     $pagination->initialize();
     //END page navigation
     //Execute query limitng the resultset
     $my_test_rows = $my_test_db->get_results($query->limit_qy_to($pagination->item_start - 1, $pagination->pg_interval), 'ARRAY_N');
     $my_test_cols = $my_test_db->get_col_info('name');
     //Output table
     $table = new table();
     $table->set_table_tpl_path($wpbi_url['tpl']);
     $table->set_table_pagination($pagination->get_html());
     $table->set_css_class('widefat');
     $table->set_rows($my_test_rows);
     $table->set_cols($my_test_cols);
     $table->has_header(true);
     $table->has_footer(true);
     $table->encode_html(true);
     $test_output = $test_output . $table->get_html();
 }
 //Prepare output
 $template_site->assign_vars(array('PG_TITLE' => $wpbi_dialog['page']['queries']['title'], 'PG_DESCRIPTION' => sprintf($wpbi_dialog['query']['saved']['test'], $vo_query->name, htmlentities($query->stmt))));
 $template_site->pparse('header');
開發者ID:RA2WP,項目名稱:RA2WP,代碼行數:31,代碼來源:queries.php


注:本文中的wpdb::get_col_info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。