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

need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

file downloaded can't be read !!
<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-dispositio

column name cancatenation within PL/SQL
I have a PLSQL store procedure, and the following statement is part of a subquery
fname||lnam

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

error help - Dynamic Image
I've been working on making my site less cluttered in the directories and more secure lately. In an

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

A little help needed passing hidden values to next page
I have a page that has hidden values in a form.

example
Code: <input name='signupID

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