But all I get is a message to the effect that no records match the query.
I've tried using an equivalent '__sql__' SELECT statement to no effect.
What might I be doing wrong?
Thank you,
Peter
Without a little extra info it's tough to say what is causing the problem, but here a few things:
1. Relationships are defined in one direction only... if you want it to be 2-ways, then you need to define it twice - once for each table.
2. Suppose you want the foobar tab to show up for Table_1 records.Ê Then your relationships.ini file should be located in:
tables/Table_1/relationships.ini
and it will look something like:
[foobar]
Table_2.id="$id"
3. The message "No records match the query", means that the relationship is probably set up correctly.Ê (i.e. the foobar tab shows up ok??).Ê If it says that no records matched the query that just means that for the current record you are viewing in Table_1, there are no records in Table_2 that fit the requirements of the relationship (i.e. Given the current record X in Table_1,Ê there are no records Y in Table_2 such that X.id=Y.id).
If you are sure that there should be at least one record meeting these criteria, then it's hard to say what is going on for sure ... let me know - I may have to take a look at your schema/ini files to tell you for sure what is going on in that case.
Hope this helps a little.
I agree, it must be something very simple.
One possibility, is case sensitivity.Ê MySQL is not case sensitive - but Dataface is in many cases.Ê i.e. make sure that the Id field is named 'Id' and not 'id' - or at least that it is named correctly in all references in Dataface.