mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Fix table_prefix support
This commit is contained in:
parent
ecb03939f8
commit
2baa8cbe4e
2
bans.php
2
bans.php
@ -7,7 +7,7 @@
|
|||||||
// <<-----------------mysql Database Connection------------>> //
|
// <<-----------------mysql Database Connection------------>> //
|
||||||
require 'includes/data/database.php';
|
require 'includes/data/database.php';
|
||||||
|
|
||||||
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_bans . ' INNER JOIN history on bans.uuid=history.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_bans . ' INNER JOIN ' . $table_history . ' on ' . $table_bans . '.uuid=' . $table_history . '.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
||||||
|
|
||||||
$retval = mysql_query($sql, $conn);
|
$retval = mysql_query($sql, $conn);
|
||||||
if (!$retval) {
|
if (!$retval) {
|
||||||
|
@ -8,6 +8,7 @@ $table_prefix = "";
|
|||||||
$table_bans = $table_prefix . "bans";
|
$table_bans = $table_prefix . "bans";
|
||||||
$table_mutes = $table_prefix . "mutes";
|
$table_mutes = $table_prefix . "mutes";
|
||||||
$table_warnings = $table_prefix . "warnings";
|
$table_warnings = $table_prefix . "warnings";
|
||||||
|
$table_history = $table_prefix . "history";
|
||||||
|
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
die('Could not connect: ' . mysql_error());
|
die('Could not connect: ' . mysql_error());
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// <<-----------------mysql Database Connection------------>> //
|
// <<-----------------mysql Database Connection------------>> //
|
||||||
require 'includes/data/database.php';
|
require 'includes/data/database.php';
|
||||||
|
|
||||||
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_mutes . ' INNER JOIN history on mutes.uuid=history.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_mutes . ' INNER JOIN ' . $table_history . ' on ' . $table_bans . '.uuid=' . $table_history . '.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
||||||
|
|
||||||
$retval = mysql_query($sql, $conn);
|
$retval = mysql_query($sql, $conn);
|
||||||
if (!$retval) {
|
if (!$retval) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// <<-----------------mysql Database Connection------------>> //
|
// <<-----------------mysql Database Connection------------>> //
|
||||||
require 'includes/data/database.php';
|
require 'includes/data/database.php';
|
||||||
|
|
||||||
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_warnings . ' INNER JOIN history on warnings.uuid=history.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
$sql = 'SELECT time,until,reason,name,banned_by_name FROM ' . $table_warnings . ' INNER JOIN ' . $table_history . ' on ' . $table_bans . '.uuid=' . $table_history . '.uuid WHERE active=1 GROUP BY name ORDER BY time DESC LIMIT 20';
|
||||||
|
|
||||||
$retval = mysql_query($sql, $conn);
|
$retval = mysql_query($sql, $conn);
|
||||||
if (!$retval) {
|
if (!$retval) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user