Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8375a9c

Browse filesBrowse files
authored
Update ssql.php
Changed debug style, added object‐wide debug property.
1 parent 2b386aa commit 8375a9c
Copy full SHA for 8375a9c

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎ssql.php

Copy file name to clipboardExpand all lines: ssql.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class SSQL extends SQ {
7575
protected $db;
7676
public $SQLite = false;
7777
protected $fncs = [];
78+
public $debug = false;
7879
public function __construct($host = "", $user = "", $password = "", $database = "") {
7980
if(empty($host)) {
8081
if(!empty($this->host)) {
@@ -149,8 +150,8 @@ public function reload() {
149150

150151
public function query($query, $flags = 0, $fnc = "Query") {
151152
$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>";
154155
if(empty($this->db) && !$this->SQLite && !in_array($fnc, ["__construct", "changeDB", "dbList"]))
155156
throw new SSQLException("(" . $fnc . "): No database selected");
156157
$qr = $this->connect->query($query);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.