WA DataAssist Pre-Select Relational Table
I have some code in an old project that looks like this that selects the options already taken in a multiple select list
<?php
// WA DataAssist Pre-Select Relational Table 1
$WA_PreSelect_RelationalTable_1 = array();
$WA_connection = $connDB;
$WA_table = "lnk_product_category";
$WA_masterKeyField = "prodID";
$WA_masterKeyType = "none,none,NULL";
$WA_masterKeyValue = "".$row_rsProducts['prodID'] ."";
$WA_masterKeyComp = "=";
$WA_joinedKeyField = "catID";
$WA_connectionDB = $database_connDB;
mysql_select_db($WA_connectionDB, $WA_connection);
$WhereObj = WA_AB_generateWhereClause(array($WA_masterKeyField), array($WA_masterKeyType), array($WA_masterKeyValue), array($WA_masterKeyComp));
$WA_Sql = "SELECT ".$WA_masterKeyField.", ".$WA_joinedKeyField." FROM ".$WA_table." WHERE ".$WhereObj->sqlWhereClause." ORDER BY ".$WA_joinedKeyField;
$WA_mrtJoinRS = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if (mysql_num_rows($WA_mrtJoinRS) > 0) {
while ($row_WA_mrtJoinRS = mysql_fetch_assoc($WA_mrtJoinRS)) {
$WA_PreSelect_RelationalTable_1[] = $row_WA_mrtJoinRS[$WA_joinedKeyField];
}
}
?>
But I cannot find a server behaviour for it in the current version of DA, what am I doing wrong ?