Add centralized DB helper; fix legacy mysql_error() landmines
- includes/db.php: shared mysqli connection + parameterized query helpers (pqs_db/pqs_exec/pqs_rows/pqs_row/pqs_val), targets PHP 7.4+. - Replace 11 mysql_error() calls (undefined function on PHP 7+) with mysqli_error($link) / mysqli_connect_error() across getFSgame, getFSplayers, config, callsign, console. Only affected already-failed error paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ mysqli_select_db($link, 'pqs') or die('Could not select database');
|
||||
|
||||
// get current pods
|
||||
$query = 'SELECT * FROM pqs_gameconfig';
|
||||
$result = mysqli_query($link, $query) or die('Query failed 12: ' . mysql_error());
|
||||
$result = mysqli_query($link, $query) or die('Query failed 12: ' . mysqli_error($link));
|
||||
$line = mysqli_fetch_array($result);
|
||||
|
||||
$visibility = $line[7];
|
||||
|
||||
Reference in New Issue
Block a user