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")
{
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

SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

Cloud Computing?
Hello,

I was wondering if anyone could help explain this term to me. I'm starting to hear it

How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,

I am overwhelmed with questions on how to migrate huge volume of Sales Orders

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

Floating Point Precision Loss
I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

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