-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathinstall.php
More file actions
24 lines (22 loc) · 708 Bytes
/
install.php
File metadata and controls
24 lines (22 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
//Exit if file called directly
if (! defined( 'ABSPATH' )) {
exit;
}
function course_certificate_segwitz_certificate_onActivation(){
global $wpdb;
$charset_collate = $wpdb->get_charset_collate();
$create_table_query = "
CREATE TABLE IF NOT EXISTS `segwitz_course_certificates` (
id INTEGER NOT NULL AUTO_INCREMENT,
certificate_code TEXT NOT NULL,
student_name TEXT NOT NULL,
course_name TEXT NOT NULL,
course_hours TEXT NOT NULL,
dob TEXT NOT NULL,
award_date TEXT NOT NULL,
PRIMARY KEY (id)
)$charset_collate;";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $create_table_query );
}