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) {

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

Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_

Comparing two dates
Hi Guys
I have two dates I want to compare. Below is my current implementation. The problem with

Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does an

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

Renaming array keys
The issue: renaming array keys inside a foreach loop.

I'm trying to build a pie chart image w

Help with Hyperlink
Hi,

What I am trying to do may be simple, I just can't get it to work. Ok...

I am usin

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