Hello,
I try to connect 2 tables with the multiple matching records relation, but there's someting I do wrong because I've got "an error in my SQL syntax near 'FROM `#__contentitem_tag_map` AS `map` WHERE `map`.`content_item_id` IN ('1', '"
It was working fine on CF v6, but I can't reproduce it on CF v7.
I think I missed something.
I join the 2 backups (v6 and v7).
Does anyone know how to do this sort of relation between to tables ?
Florence
I try to connect 2 tables with the multiple matching records relation, but there's someting I do wrong because I've got "an error in my SQL syntax near 'FROM `#__contentitem_tag_map` AS `map` WHERE `map`.`content_item_id` IN ('1', '"
It was working fine on CF v6, but I can't reproduce it on CF v7.
I think I missed something.
I join the 2 backups (v6 and v7).
Does anyone know how to do this sort of relation between to tables ?
Florence
With the backups🙂
[file=13710]TestReadData_23_Jan_2021_22_04_59.cf6bak[/file]
[file=13712]TestReadData_23_Jan_2021_22_04_35.cf7bak[/file]
[file=13710]TestReadData_23_Jan_2021_22_04_59.cf6bak[/file]
[file=13712]TestReadData_23_Jan_2021_22_04_35.cf7bak[/file]
does it work when you chnge the relation type to "one matching record, fkey in this model" ?
Hello Max,
Yes, it does work when the relation type is "one matching record, foreign key in this model".
Here the result in the debug with this type of relation :
What I need is this result :
It was working on CFv6 with the "multiple matching records" relation, but with CFv7, I've got an error.
Maybe it is the syntax in the "equation" that is not correct.
I have tried with :
map.content_item_id = contact.id (field)
map.content_item_id IN contact.id (field)
map.content_item_id = contact.id (value)
map.content_item_id IN contact.id (value)
But I've got the same error (the one in the first message) with all syntaxes.
Yes, it does work when the relation type is "one matching record, foreign key in this model".
Here the result in the debug with this type of relation :
[var] => Array ( [0] => Array ( [contact] => Array ( [id] => 70 ) [map] => Array (
[content_item_id] => 70
[tag_id] => 2 ) ) [1] => Array ( [contact] => Array ( [id] => 70 ) [map] => Array (
[content_item_id] => 70 [tag_id] => 4 ) )
What I need is this result :
[var] => Array ( [0] => Array ( [contact] => Array ( [id] => 70 ) [map] => Array (
[0] => Array
(
[content_item_id] => 70 [tag_id] => 2 )
[1] => Array
(
[content_item_id] => 70
[tag_id] => 4
) ) )
It was working on CFv6 with the "multiple matching records" relation, but with CFv7, I've got an error.
Maybe it is the syntax in the "equation" that is not correct.
I have tried with :
map.content_item_id = contact.id (field)
map.content_item_id IN contact.id (field)
map.content_item_id = contact.id (value)
map.content_item_id IN contact.id (value)
But I've got the same error (the one in the first message) with all syntaxes.
There is a bug, if you can not wait for the next official update then you may send me a message using the contact page to get a patch file!
You need to login to be able to post a reply.