mirror of
https://gitlab.com/ceda_ei/Datology-Bot
synced 2025-05-09 20:06:52 +02:00
Fix table name and avoid double id in query.
This commit is contained in:
parent
fe02ebe2fb
commit
ec8b928262
@ -60,14 +60,16 @@ for ($i = 97; $i <= 122 ; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result->num_rows > 0) {
|
if ($result->num_rows > 0) {
|
||||||
$query = "DELETE FROM " . $mysql['database'] . " WHERE id = $sender_id ;";
|
$query = "DELETE FROM data WHERE id = $sender_id ;";
|
||||||
$conn->query($query);
|
$conn->query($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "INSERT INTO data values( $sender_id";
|
$query = "INSERT INTO data values( $sender_id";
|
||||||
|
|
||||||
foreach ($alphabet as $letter=>$num){
|
foreach ($alphabet as $letter=>$num){
|
||||||
$query .= "," . $num;
|
if ($letter != "id") {
|
||||||
|
$query .= "," . $num;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query .= ");";
|
$query .= ");";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user