DATABASE QUERY ERROR occur when the situation below is used.
1- Fields Builder->Profile Fields: Create a profile item with a PREDEFINED list associated to is "Possible values" with type selector option.
and in the MATCH tab, match it to a field and add a value for the match.
2- Activate that field
3- Now, if you EDIT your profile and change de value of that field, it will create "DATABASE QUERY ERROR" and if you refresh the data will be save.
It only does that with predefined data list and MATCH option attributed to it. If match option of NOT SET and 0, no error occur.
A error occur also if you try to SEARCH MATCH: search.php?show=match
Query:
SELECT `ID` FROM `Profiles` WHERE `Status` = 'Active' AND `ID` != 2 AND `` = '1'
Mysql error: Unknown column '' in 'where clause'
Found error in the file 'public_html/inc/match.inc.php' at line 57.
Called 'getAllWithKey' function with erroneous argument #0.
Something to do with that line:
$aMathFields[$sKey]['profiles'] = $oDb->getAllWithKey("SELECT `ID` FROM `Profiles` WHERE `Status` = 'Active' AND `ID` != $iProfileId AND $sCond", 'ID');