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

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

BIG file upload!
Hey guys!

I'm trying to upload a file, it works well with smaller files but with 60mb+, I get

CHECH A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

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