Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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;
}
 
PREVIOUS NEXT
Tagged: #wp #php #rows #number #mysql
ADD COMMENT
Topic
Name
2+4 =