Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $wpdb;
- $createSQL = "
- CREATE TABLE `". $wpdb->prefix ."_book_ratings` (
- `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
- `book_id` bigint(20) UNSIGNED NOT NULL,
- `rating` float(3.1) UNSIGNED NOT NULL,
- `user_ip` varchar(32) NOT NULL
- ) ENGINE=InnoDB" . $wpdb->get_charset_collate() . " AUTO_INCREMENT=1;
- ";
- require( ABSPATH . '/wp-admin/includes/upgrade.php' );
- dbDelta( $createSQL );
Add Comment
Please, Sign In to add comment