if (mysql_num_rows($result)==0) { PERFORM ACTION }
For PHP 5 and 7 and above use mysqli:
if (mysqli_num_rows($result)==0) { PERFORM ACTION }
More Related Contents:
- save user images in MYSQL database by which method? [closed]
- Im trying to create some temporary tables in mysql using php
- the update query just update the last row and affect other with it’s value
- How to insert images into a database using PHP [closed]
- How to apply bindValue method in LIMIT clause?
- How to change mysql to mysqli?
- Importing CSV data using PHP/MySQL
- Convert latin1 characters on a UTF8 table into UTF8
- How do I display a MySQL error in PHP for a long query that depends on the user input? [duplicate]
- Do SQL connections opened with PDO in PHP have to be closed
- Php – Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- mysql select query within a serialized array
- mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in php [duplicate]
- Whats the easiest way to determine if a user is online? (PHP/MYSQL)
- What is the advantage of using try {} catch {} versus if {} else {}
- ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
- How to convert ISO8601 to Date format in php
- Algorithm for generating a random number
- return one value from database with mysql php pdo
- Trying to access array offset on value of type bool
- onbeforeprint() and onafterprint() equivalent for non IE browsers
- How to get a query error from prepare() in PDO PHP?
- How can I pass an array of PDO parameters yet still specify their types?
- Fatal error: Call to a member function query() on null
- MySQL & PHP Parameter 1 as Resource
- MySQL GROUP BY and Fill Empty Rows
- mysql injection damages?
- PHP PDO how to run a multiple query request?
- How to check if a value already exists to avoid duplicates?
- How to use MySQL Found_Rows() in PHP?