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

Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,

http://w

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

Error in SQL Syntax HELP!!!
I have this page:

Code: <?php

session_start();

//connect to server and s

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

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