PHP using IF to display error


Posted on 16th Feb 2014 07:03 pm by admin

i have a MySQL query and i want to display 1 thing only if the number of affected rows is >=1 and if not then display the error, here is what i have so far and nothing is being displayed ...

Code: if (mysql_num_rows() >= "1")
{
Did you know?Explore Trending and Topic pages for more stories like this.
echo "Update OK!<br />";
}
else
{
die("Update failed: " . mysql_error());
}
No comments posted yet

Your Answer:

Login to answer
331 Like 54 Dislike
Previous forums Next forums
Other forums

Shopping Cart
Can anyone direct me to a Simple, Basic structure of a shopping cart.
New to classes. I want to s

simple ping code
been searchin the site/web and found code thats simple but doesnt work.

I have a personal we

php/mysql auto logout after 2 hour and reset password
Hi all,

This I hope will make sense. I've the following code which when a user logins in, cr

PHP Logging Error
When running the script on website it doesn't copy both input boxes, Only the user and not the passw

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

file downloaded can't be read !!
<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-dispositio

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash