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

re calling a function without including file
Hi,
i am new to programming in php, i was just checking the wordpress code and found out in the w

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for 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