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

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place

serializing objects - loses methods - the point being?
Hi

I know that serializing an object will lose the methods. But whats the point in that? What

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

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

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

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