Fix bug - new user not added to db.
Changed chat_id to id
This commit is contained in:
parent
47b59abbd8
commit
ce347074ad
|
@ -48,7 +48,7 @@ function new_member() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$username = $member->{"username"};
|
$username = $member->{"username"};
|
||||||
$user_id = $member->{"chat_id"};
|
$user_id = $member->{"id"};
|
||||||
$query = "INSERT INTO users (user_id, username, follows) values($user_id, '$username', -1);";
|
$query = "INSERT INTO users (user_id, username, follows) values($user_id, '$username', -1);";
|
||||||
$mysql = require('mysql_credentials.php');
|
$mysql = require('mysql_credentials.php');
|
||||||
$conn = new mysqli($mysql['servername'], $mysql['username'], $mysql['password'], $mysql['database']);
|
$conn = new mysqli($mysql['servername'], $mysql['username'], $mysql['password'], $mysql['database']);
|
||||||
|
|
Loading…
Reference in New Issue