Add Member Through Admin Panel - part 2

Quote · 17 Nov 2018

I got this DB error saying that the value is incorrect

  function isUnique($key, $value){
        $value = addslashes($value);
        $query = "SELECT COUNT(*) FROM `Profiles` WHERE `$key` = '$value'";
        if((int)db_value($query) > 0)
            return false;
        return true;
    }
}

What should I use for the value (>0)

Quote · 17 Nov 2018

 

I got this DB error saying that the value is incorrect

  function isUnique($key, $value){
        $value = addslashes($value);
        $query = "SELECT COUNT(*) FROM `Profiles` WHERE `$key` = '$value'";
        if((int)db_value($query) > 0)
            return false;
        return true;
    }
}

What should I use for the value (>0)

As I said, this was a free module that I did some time back.  I will have to look at the module; install it on a test site and see.  You don't use anything there for the value; it is querying the database.  If you like, you can post the actual SQL error you got.  Note: you don't have to post the traceback.

Geeks, making the world a better place
Quote · 18 Nov 2018
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.