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

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

set xml path in flash when xml created in memorystream and webrequest
i am creating an xml file using memory stream and i want to load this xml file into the flash on cli

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

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