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

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

PHP/PKI
I am trying to set up a web application that uses pki. does anyone have a good tutorial to set this

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

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

However

Perplexing problem showing a .jpg
Please disregard..........I figured it out

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

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