"UPDATE $table SET op = '$op_val' WHERE $query_key = '$login'
AND Attribute = '$sql_attr' AND Value = '$val';");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
- echo "<b>Operator change failed for attribute $key</b><br>\n";
+ echo "<b>Operator change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
}
// if value is the same as that in the sql database do nothing
$res = @da_sql_query($link,$config,
"DELETE FROM $table WHERE $query_key = '$login' AND Attribute = '$sql_attr';");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
- echo "<b>Delete failed for attribute $key</b><br>\n";
+ echo "<b>Delete failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
}
// if value is null then don't add it
else if ($val == '')
"INSERT INTO $table ($query_key,Attribute,Value $text2)
VALUES ('$login','$sql_attr','$val' $op_val2);");
if (!$res || !@da_sql_affected_rows($link,$res,$config))
- echo "<b>Change failed for attribute $key</b><br>\n";
+ echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
}
echo "<b>User already exists in user info table.</b><br>\n";
}
else
- echo "<b>Could not add user information in user info table: " . da_sql_error($link,config) . "</b><br>\n";
+ echo "<b>Could not add user information in user info table: " . da_sql_error($link,$config) . "</b><br>\n";
}
if ($Fgroup != ''){
$res = @da_sql_query($link,$config,
}
}
else
- echo "<b>Database query failed partially</b><br>\n";
+ echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
- echo "<b>Database query failed</b><br>\n";
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
foreach($attrmap as $key => $val){
if (isset($tmp[$val])){
if ($tmp[$val][0] != '')
}
}
else
- echo "<b>Database query failed partially</b><br>\n";
+ echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
$res = @da_sql_query($link,$config,
"SELECT UserName FROM $config[sql_usergroup_table] WHERE GroupName = '$login' ORDER BY UserName;");
if ($res){
}
}
else
- echo "<b>Database query failed partially</b><br>\n";
+ echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
foreach($attrmap as $key => $val){
if (isset($tmp[$val])){
$item_vals["$key"] = $tmp[$val];
}
else
- echo "<b>Database query failed</b><br>\n";
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to database</b><br>\n";
$mobile = ($row[Mobile] != '') ? $row[Mobile] : '-';
}
}
+ else
+ echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
else
- echo "<b>Database query failed partially</b><br>\n";
+ echo "<b>Database query failed partially: " . da_sql_error($link,$config) . "</b><br>\n";
foreach($attrmap as $key => $val){
if (isset($tmp[$val])){
$item_vals["$key"] = $tmp[$val];
}
else
- echo "<b>Database query failed</b><br>\n";
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to database</b><br>\n";