Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

An Odd AddSelect Problem

edited March 2007 in Vanilla 1.0 Help
I got an AddSelect problem

I need to know what the line
if ($TableAlias != '') $QualifiedField = $TableAlias.'.'.$this->Context->DatabaseColumns[$this->TableMap[$TableAlias]][$Field];
in Framework.Class.SQLBuilder does exactly.

My problem is I have 2 fields in a table that I can't show correctly. So if the array looks like this
$s->AddSelect(array('Address','Telephone', 'Website'), 't');
Everything is fine, but if it looks like this
$s->AddSelect(array('Address','Telephone', 'RType', 'Website'), 't');
The select fails and SQL looks like
...t.Telephone as Telephone, t. as RType, t.Website as Website...

So $this->Context->DatabaseColumns[$this->TableMap[$TableAlias]][$Field] is the culprit, but why?

(there are, as I said, 2 fields that do this)

Any thoughts or a quick explanation of that one line would be helpful,

This discussion has been closed.