MCPcopy Create free account
hub / github.com/EqualifyEverything/equalify / get_next_id

Method get_next_id

models/db.php:716–736  ·  view source on GitHub ↗

* Get Next ID */

($table)

Source from the content-addressed store, hash-verified

714 * Get Next ID
715 */
716 public static function get_next_id($table){
717
718 // SQL
719 $db = $GLOBALS['DB_NAME'];
720 $sql = "SELECT `AUTO_INCREMENT` FROM
721 INFORMATION_SCHEMA.TABLES WHERE
722 TABLE_SCHEMA = '$db'
723 AND TABLE_NAME = '$table'";
724
725 // Query
726 $results = self::query($sql, array(), true);
727
728 // Returns meta_value.
729 $data = $results->fetch_object();
730 if(empty($data)){
731 return false;
732 }else{
733 return $data->AUTO_INCREMENT;
734 }
735
736 }
737
738 /**
739 * Create Alerts Table

Callers 1

save_report.phpFile · 0.80

Calls 1

queryMethod · 0.95

Tested by

no test coverage detected