But are you sure that left join work?

maxinic

Member
I've tried everything but I can not understand the problem.
I also tried with other threads but nothing.

Retrying with another simple example. Can you tell me where i wrong?

classic example
the authors and books

list-authors
id = autoincrement id internal
name = field
booksid = integer field

list-Books
idbooks
title=field text

joins:
Left Join from authors to books ON authors.booksid = books.idbooks
Repeteable = Yes
Display = Merge

When I fill out the form, it returns records inserted but there is nothing in the authors list, enter only the book

I also noticed that if I use in joins display = each rows
it insert in both (authors and books) but does not insert nothing in authors.booksid for the relationship

What I can do to insert the records in two tables simultaneously?

I use fabrik 3.0.6 and joomla 2.5.1
Thanks
Max
 
your 'book' table should refer to the 'author' primary key.

so ignore your booksid and create in the book list an element 'idaut' (with the option hidden = yes) and do the join on that in your list

see picture for details and what you can get

ps: also replace you idbook by a simple id (automatically created by fabrik when you create a new list)
 

Attachments

  • ScreenHunter_02 May. 30 21.06.gif
    ScreenHunter_02 May. 30 21.06.gif
    6.2 KB · Views: 181
  • ScreenHunter_03 May. 30 21.12.gif
    ScreenHunter_03 May. 30 21.12.gif
    3.3 KB · Views: 163
Break the join you already have and make sure you completely save and close the list.

Add a field element to books and call it author_id.

Now go back into your list and create the join as

Left Join from authors.id to books.author_id and set repeat as yes.


See if that works as expected.
 
Now it work
I do not know how to thank you guys!!!! and I admit that I read back some guidance on relationships.
So if you know someone, can you give me some link?
thanks again!
 
Well there are some tutorials under bronze subscription and there are a few posts about it. It still confuses me at times so don't worry about the confusion. ;)


database relationships are pretty standard so you can find loads of examples on the web. Once you become familiar with them it makes it a little easier to set them up in Fabrik.

The relationship above is a one-2-many relationship, one author can have many books.

Then there is the many-2-many relationship, one student can have many teachers and one teacher can have many students...... That's for another day though. :)
 
The first entry is google does well explaining. Sometimes you need to read these things a few times, or even draw them out. Believe me it took me ages to grasp it all, don't be put off by it though.



Try This Link
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top