Skip to content

Commit 57ceb71

Browse files
author
mimidots
committed
Added database connection error check functionality
1 parent a086442 commit 57ceb71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Builder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class Builder extends Connect
2222

2323
public static function table($table)
2424
{
25+
//as all calls will start with this function, first check if database connection has being established
26+
if(Connect::getConn()==null){
27+
self::terminate(self::$response);
28+
}
2529
//TODO sanitize the table name
2630
self::$table = $table;
2731

0 commit comments

Comments
 (0)