• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

phpmysql


PHP Snippet 1:

$amn = mysql_query("SELECT * FROM `Messages` WHERE to_user='$usr' AND read='0'");

if($amn === false) {
    var_dump(mysql_error());
}
else {
    print_r(mysql_num_rows($amn));
}

Related Snippets

Post Form Data To phpmyadmin Database

IlluminateDatabaseQueryException could not find driver [duplicate]

PHP contact form configuration [duplicate]

Laravel 5 session not persisting after user is logged in

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

Sentry on Symfony: how to exclude `NotFoundHttpException`

PHP random string generator

laravel MVC execution flow

Detect emoticons in string

What is my SQL missing?

Prevent blank space in pdf pages (DomPdf)

How can I make this nested location configuration use the correct path to call a php program?

Currently Using CodeIgniter Framework i have an Error

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

Access denied for user 'homestead'@'localhost' (using password: YES)

About Contact Privacy policy Terms and conditions