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

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

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

Preserving user-entered linebreaks
Hi, I'm building a web 2.0 thingy from scratch and I wanna display text which users input. It's all

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

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