bguthrie
Posts: 31
|
Posted: 02/10/2004, 2:51 PM |
|
I was wondering whether DLookup supports Joins in the Domain entry. I haven't been able to enter a join that works.
Thanks you for your assistance.
_________________
Regards,
Bruce |
|
|
peterr
Posts: 5971
|
Posted: 02/10/2004, 3:25 PM |
|
Bruce,
CCDLookup function supports whatever SQL syntax is supported by your database. If you look at CCDLookup function in Common.php you will see that it consists of only 2 lines of code:
$sql = "SELECT " . $field_name . ($table_name ? " FROM " . $table_name : "") . ($where_condition ? " WHERE " . $where_condition : "");
return CCGetDBValue($sql, $db);
Therefore this function allows you to utilize any valid SQL syntax. All it does it adds SELECT, FROM and WHERE in the appropriate places and then executes the SQL.
If you use valid joins for your database then this must work. Otherwise the database cannot execute your query, or possibly you have a spelling error (?).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
bguthrie
Posts: 31
|
Posted: 02/10/2004, 5:01 PM |
|
Thank you Peter for the clarification. I was using a join which I had cut from CCS Query Builder, but I'll go back and look at it more closely.
_________________
Regards,
Bruce |
|
|
|