mirror of
https://github.com/Solo-Web-Works/BillTrak.git
synced 2026-01-29 09:50:34 +00:00
✨feature: Initial commit
This commit is contained in:
17
includes/db.php
Normal file
17
includes/db.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
class DB {
|
||||
public static function connect() {
|
||||
$db = new PDO('sqlite:'.__DIR__.'/../data/bills.db');
|
||||
|
||||
$db->exec("CREATE TABLE IF NOT EXISTS bills (
|
||||
id INTEGER PRIMARY KEY,
|
||||
billDate TEXT NOT NULL,
|
||||
billName TEXT NOT NULL,
|
||||
amount REAL NOT NULL,
|
||||
paymentId TEXT,
|
||||
year INTEGER NOT NULL
|
||||
)");
|
||||
|
||||
return $db;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user