sql query stops searching after 412 records [duplicate]

I have built a simple login system to my custom website i have made a table on my database in phpmyadmin where i store usernames & passwords and now i realize that after 412 record the sql query cant find a match for a username and password. Iam trying to search the whole table but it stops right there.


``
// Define $username and $password
$username = $_POST['username'];
$password = $_POST['password'];
// mysqli_connect() function opens a new connection to the MySQL server.
$conn = mysqli_connect("******", "*******", "*******", "********");
// SQL query to fetch information of registered users and finds user match.
$query = "SELECT username, password from login where online=1 AND username='" . $username . "' AND password='" . $password . "' LIMIT 1";
// To protect MySQL injection for Security purpose
$stmt = $conn->prepare($query);
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$stmt->bind_result($username, $password);
$stmt->store_result();
if($stmt->fetch()){ //fetching the contents of the row {
$_SESSION['login_user'] = $username; // Initializing Session
header("location: user_profile"); // Redirecting To Profile Page
}
``