Skip Navigation

[Resolved] How to create a one-to-one relationship with php

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by Edward 4 years, 11 months ago.

Author
Posts
#1936555

Hi guys,

On 2020 we used a php method to create a one-to-one relationship between posts, here example:

$wpdb->insert(
'wp_toolset_associations',
array(
'relationship_id' => 1,
'parent_id' => $post_id,
'child_id' => $new_ticket_id,
'intermediary_id' => 0,
)
);

this work perfect, but in new version we don't know how we can achieve same. The relationships works different.

Thanks for your help.

#1936567

My issue is resolved now. Thank you!