1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php
/*
* SQL Tables
*/
/*
$tables = array(
'table_name' => array(
'table' => $table_sql_code, //table creation code
'data' => $table_data, //data to insert
),
);*/
$tables = array(
'hjpl_cache' => array(
'table' => table_hjpl_cache(), //table creation code
)
);
function table_hjpl_cache()
{
global $wpdb;
return "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "hjpl_cache (
id varchar(64) NOT NULL,
value longtext NOT NULL,
expiration int(11) NOT NULL,
PRIMARY KEY (id),
KEY expiration (expiration)
) ENGINE=InnoDB;";
}