Its the function that is called relative to layout being generated.
It provides data for a specific layout / view
function _buildQuery_default() - is the query for your tables default view
function _buildQuery() - defines the FK dropdown / combo box data (i think? from memory)
If you had two layouts for the same table
1) userdetails
2) usercontact
if your default table was userdetails...
you would have
function _buildQuery()
function _buildQuery_default()
function _buildQuery_usercontact()
if your default layout was usercontact
you would have
function _buildQuery()
function _buildQuery_userdetails()
function _buildQuery_default()
As for
function addWhere($where_clause)
it puts the item at the end of the statement
its useful if you need to define a query that returns a list of items containing specific data such as town, gender, postcode
for instance
. addWhere($address_town->id=4)
. buildQuery_WhereAuthor()
Would Give...
WHERE $user->id = 43 AND $address_town->id = 4
And the record would be returned if user #43 lived in town #4
If you understand MySql well enough and echo, copy and dump the query into your Mysql Interface it becomes a lot easier to understand whats happening