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

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script.
<

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

Significance of BPM
Hi Experts,
I am a novice in BPM , I just want to know how BPM as permenant department is

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?

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