My query is being run with no results.


Posted on 16th Feb 2014 07:03 pm by admin

I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Did you know?Explore Trending and Topic pages for more stories like this.
if(isset($_SESSION['admin_username']) && isset($_SESSION['admin_id']) && isset($_SESSION['admin_session_key'])) {

$this->duser_id = mysql_real_escape_string(trim(addslashes(strip_tags(is_numeric($duser_id)))));
$this->user_email = mysql_real_escape_string(trim(addslashes(strip_tags($user_email))));
$this->user_username = mysql_real_escape_string(trim(addslashes(strip_tags($user_username))));

if(!empty($this->duser_id) && !empty($this->user_email) && !empty($this->user_username)) {

$this->dropusersql = "DELETE FROM `members` WHERE `members`.`user_id` = '$this->duser_id' AND `members`.`username` = '$this->user_username' AND `members`.`emailaddress` = '$this->user_email' LIMIT 1";
$this->run_dropusersql = mysql_query($this->dropusersql) or trigger_error('Query failed: ' . mysql_error(), E_USER_ERROR);

$this->removecomplete = '<font color="green"> - The user you select was removed.</font>';
return($this->removecomplete);

} else {

$this->emptyfields = "<font color='red'> - You have left mandatory fields empty.</font>";
return($this->emptyfields);

}

} else {

header('Location: login.php');

}

}

(Part of a class). I get the print back (<font color="green"> - The user you select was removed.</font>) but the query isnt deleting the row.

Many thanks,
No comments posted yet

Your Answer:

Login to answer
140 Like 12 Dislike
Previous forums Next forums
Other forums

mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi

How to insert random unique values in 2 columns ?
I have table with 2 columns

Create Table code_for_code (
first_code varchar2(10) uni

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

Weird problem with SELECT command..Help!
Hi!

It seems I'm having a really weird problem with SQL SELECT command....I have table into a

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

insert quotes
Hi,

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

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

textfield unchanged
hi,
i want my form to know whether its textbox is unchange or not.

if($textbox == 'unchang

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

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