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

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

Need PHP help... have all the elements... just need help putting them together :
Hey Guys,

I was wondering if someone could help me. I am doing a website for a client which

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

Regular expression tips or resources
Hello! I'm having some issues implementing the appropriate regex patter to eliminate unwanted charac

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

url- go to webpage
i have an input text field and submit button.

how do i make the url entered into the textfiel

asp authentication problem
Hello all, I want to use the asp authentication (from asp.net configuration) in my web site. there

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