Skip to content

Instantly share code, notes, and snippets.

@Dinamiko
Created October 15, 2015 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dinamiko/07dc28789be87bd6acfb to your computer and use it in GitHub Desktop.
Save Dinamiko/07dc28789be87bd6acfb to your computer and use it in GitHub Desktop.
<?php
/**
* Devuelve el total de registros de la tabla encuesta
* @return int $total registros
*/
function encuesta_get_registros() {
global $wpdb;
$table_name = $wpdb->prefix . "encuesta";
$total = $wpdb->get_results( "SELECT * FROM $table_name" );
return count( $total );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment