Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $stmt = $conn->mysqli->stmt_init();
- $stmt = $conn->mysqli->prepare('SELECT Username, EmailVerified, Blocked FROM user WHERE Email = ? AND SLANumber = ? AND Password = ?');
- $stmt->bind_param('ssb', $_POST['EmailID'], $_POST['SLANumber'], $_POST['Password']);
- $stmt->execute();
- $stmt->store_result();
- $result = $stmt->get_result();
- if($result->num_rows == 0){
- echo 'No rows found';
- }
- else{
- // Continue processing here
- .....
- }
- $stmt->execute();
- // $stmt->store_result();
- $result = $stmt->get_result();
- if(result->num_rows == 0){
- ...
- }
- $stmt->execute();
- // $stmt->store_result();
- $result = $stmt->get_result();
- if($stmt->affected_rows == 0){
- ...
- }
- $result = $stmt->get_result();
- // Also check strict comparison against int 0,
- // to avoid incorrect equality with boolean FALSE
- if($result->num_rows === 0){
- echo 'No rows found';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement