Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if query succeeded

<?php
	// peform a query 
      $query = "SELECT `*` FROM user";
      $results = mysqli_query($databaseConnection, $query);

      if (mysqli_num_rows($results) == 0) {
        // The query returned 0 rows!
      } else {
        // the query returned ATLEAST one row
      }

      if (mysqli_num_rows($results) >= 5) {
        // the query returned more than 5 rows
        }
?>
Comment

PREVIOUS NEXT
Code Example
Php :: simplexml_load_string alternative php 
Php :: codeigniter update query return value 
Php :: php unserialize array 
Php :: laravel log 
Php :: Instalar Lamp server en Ubuntu 
Php :: brew reinstall php 7.4 
Php :: guzzle Request with POST files 
Php :: how to get ip address of client in php 
Php :: how to send html table in email body in php 
Php :: read line by line php 
Php :: execute php in terminal 
Php :: change field name in validation laravel 8 
Php :: hide all error in php 
Php :: mysqli_test 
Php :: php check if associative array 
Php :: array intersect 
Php :: how to make a config file for php 
Php :: laravel append parameter to links 
Php :: php foreac 
Php :: wp_login_form wrong password redirect 
Php :: php if elseif 
Php :: php - How do I calculate the percentage of a number? 
Php :: php array to array collection 
Php :: validate contact us page 2021 php coding 
Php :: php json get value by key 
Php :: Get wordpress posts by category name..! 
Php :: password_verify php 
Php :: php hello world program 
Php :: how make a variable global php 
Php :: while true php 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =