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

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,

The new program for Translating GL Balances (FAS 52) gives the option to use diffe

Taxonomy? Classification? Categorisation?
Not sure if there is a way around this classification problem
I have a supplier who produces

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

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is

background color imagefill
Hello

I would like to ask you why I see this square in red color just in my local xampp insta

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

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