> Now I wonder how I should rewrite the above macro definition so I can be
> sure it checks it's own 'if' and never unexpectedly interferes which
> other else statements... I don't know how...
I think using brackets around the if in the code where the makro is used
should fix it.
Like this:
if (qresult && has_value(qresult->Key_name || ({}), key_name))
{
do_log("Index %O was already set", key_name);
}
else
{
do_log("Adding index %O", key_name);
myDB->Query("ALTER TABLE dbFinalPublicationPassive.tbIssueDetails"
" ADD INDEX IssueID_shortname (IssueID,
ShortName)");
Marc