File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ class SSQL extends SQ {
75
75
protected $ db ;
76
76
public $ SQLite = false ;
77
77
protected $ fncs = [];
78
+ public $ debug = false ;
78
79
public function __construct ($ host = "" , $ user = "" , $ password = "" , $ database = "" ) {
79
80
if (empty ($ host )) {
80
81
if (!empty ($ this ->host )) {
@@ -149,8 +150,8 @@ public function reload() {
149
150
150
151
public function query ($ query , $ flags = 0 , $ fnc = "Query " ) {
151
152
$ query = trim ($ query );
152
- if ($ flags & self ::DEBUG )
153
- print "<strong> " . ucwords ($ fnc ) . ":</strong> <span style= \" font-family: monospace \" > " . htmlentities ($ query ) . "</span > " ;
153
+ if ($ flags & self ::DEBUG || $ this -> debug )
154
+ print "<pre>< strong> " . ucwords ($ fnc ) . ":</strong> " . htmlentities ($ query ) . "</pre > " ;
154
155
if (empty ($ this ->db ) && !$ this ->SQLite && !in_array ($ fnc , ["__construct " , "changeDB " , "dbList " ]))
155
156
throw new SSQLException ("( " . $ fnc . "): No database selected " );
156
157
$ qr = $ this ->connect ->query ($ query );
You can’t perform that action at this time.
0 commit comments