Update database table references and clean up whitespace
Replaced all references to `maintenancemode_dbtest.customer_attributes` with `customer_attributes` in `users_o.php` for clarity and consistency. Additionally, removed unnecessary empty line in `redis_t.php` to improve code formatting.
This commit is contained in:
@@ -339,7 +339,7 @@ class users_o extends db
|
||||
$attribute = $db->escape_string($attribute);
|
||||
// To prevent two attributes with the same name for the same user, we will delete the old one if it exists
|
||||
$this->deleteAttribute($attribute, $user_id);
|
||||
$sql = "INSERT INTO maintenancemode_dbtest.customer_attributes (user_id, attribute) VALUES ($user_id, '$attribute')";
|
||||
$sql = "INSERT INTO customer_attributes (user_id, attribute) VALUES ($user_id, '$attribute')";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ class users_o extends db
|
||||
return;
|
||||
}
|
||||
// If the attribute exists, delete it, if it does not exist, nothing will happen
|
||||
$sql = "DELETE FROM maintenancemode_dbtest.customer_attributes WHERE user_id = $user_id AND attribute = '$attribute' LIMIT 1";
|
||||
$sql = "DELETE FROM customer_attributes WHERE user_id = $user_id AND attribute = '$attribute' LIMIT 1";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ class users_o extends db
|
||||
$user_id = $this->id;
|
||||
}
|
||||
$attribute = $db->escape_string($attribute);
|
||||
$sql = "SELECT * FROM maintenancemode_dbtest.customer_attributes WHERE user_id = $user_id AND attribute = '$attribute' LIMIT 1";
|
||||
$sql = "SELECT * FROM customer_attributes WHERE user_id = $user_id AND attribute = '$attribute' LIMIT 1";
|
||||
$result = $db->query($sql);
|
||||
if ($result->num_rows > 0) {
|
||||
return true;
|
||||
@@ -469,7 +469,7 @@ class users_o extends db
|
||||
if ($user_id === null) {
|
||||
$user_id = $this->id;
|
||||
}
|
||||
$sql = "SELECT * FROM maintenancemode_dbtest.customer_attributes WHERE user_id = $user_id";
|
||||
$sql = "SELECT * FROM customer_attributes WHERE user_id = $user_id";
|
||||
$result = $db->query($sql);
|
||||
$array = $db->fetch_all($result);
|
||||
$this->attributes = $array;
|
||||
|
||||
Reference in New Issue
Block a user