-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (36 loc) · 1.03 KB
/
index.php
File metadata and controls
42 lines (36 loc) · 1.03 KB
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
32
33
34
35
36
37
38
39
40
41
42
<?php
// include you database connection file
// include 'connect.php'; // Uncomment this line if you have a connect.php file for database connection
// include 'connect.php';
include 'build.php';
/*
* Example usage:
* $params = [
* 'table_name' => 'users',
* 'columns' => [
* [
* 'column_name' => 'id',
* 'datatype' => 'INT',
* 'nullable' => false,
* 'primary_key' => true,
* 'auto_increment' => true
* ],
* [
* 'column_name' => 'username',
* 'datatype' => 'VARCHAR(50)',
* 'nullable' => false
* ],
* [
* 'column_name' => 'email',
* 'datatype' => 'VARCHAR(100)',
* 'nullable' => false
* ]
* ]
* ];
*
*
## Call the function to alter the table
$result = migrate($con, $params);
## Output the result of the operation
echo $result;
*/