Answers for "wp php get rows number from mysql"

PHP
0

wp php get rows number from mysql

function get_number_of_db_rows($table_name)
{
    global $wpdb;
    $count_query = "select count(*) from $table_name";
    $num = $wpdb->get_var($count_query);
    return $num;
}
Posted by: Guest on August-29-2021

Browse Popular Code Answers by Language