TOPIC:

Creating a view with data from multiple sources (tables) 1 year 11 months ago #261078

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 786
Hi,

if you want to create CB view based on database, then go to Content Builder->Data Storages->and from ...or choose an existing table select your database table.

If you want to combine multiple db in one CB view, then in sql server you should to join tables in one table, and then select this one table when you create a view.

Here is described how to join three tables for example:
stackoverflow.com/questions/18642616/sql...or-3-tables/50868706
learnsql.com/blog/how-to-join-3-tables-or-more-in-sql/
www.geeksforgeeks.org/joining-three-tables-sql/

Please test it, and come back to me

If I missed something please let me know

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Creating a view with data from multiple sources (tables) 1 year 11 months ago #261111

  • Topic Author
  • Maago
  • Offline
  • Premium Member
  • Premium Member
  • Registered
  • Posts: 213
  • Thanks: 0
Tihana,

I already created a view within my database which contains the fields I want to show in my CB view.

I can create this CB view and can select the database view as source.
But if I then try to open this CB view error is appearing:

Error 1054: Unknown column 'r.created_by' in 'field list'

Please Log in or Create an account to join the conversation.

Creating a view with data from multiple sources (tables) 1 year 11 months ago #261115

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 786
Hi,

could you please post here "the code", which you used to join tables in phpmyadmin?

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Creating a view with data from multiple sources (tables) 1 year 11 months ago #261116

  • Topic Author
  • Maago
  • Offline
  • Premium Member
  • Premium Member
  • Registered
  • Posts: 213
  • Thanks: 0
SELECT
`montafreunde_neu`.`j17_users`.`id` AS `id`,
`montafreunde_neu`.`j17_users`.`name` AS `name`,
`montafreunde_neu`.`j17_users`.`email` AS `email`,
`montafreunde_neu`.`j17_user_usergroup_map`.`user_id` AS `user_id`,
`montafreunde_neu`.`j17_user_usergroup_map`.`group_id` AS `group_id`,
`montafreunde_neu`.`j17_usergroups`.`id` AS `ug_id`,
`montafreunde_neu`.`j17_usergroups`.`title` AS `title`
FROM
(
(
`montafreunde_neu`.`j17_users`
JOIN `montafreunde_neu`.`j17_user_usergroup_map` ON
(
`montafreunde_neu`.`j17_users`.`id` = `montafreunde_neu`.`j17_user_usergroup_map`.`user_id`
)
)
JOIN `montafreunde_neu`.`j17_usergroups` ON
(
`montafreunde_neu`.`j17_usergroups`.`parent_id` = `montafreunde_neu`.`j17_user_usergroup_map`.`group_id`
)
)

Please Log in or Create an account to join the conversation.

Creating a view with data from multiple sources (tables) 1 year 11 months ago #261117

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 786
Hi,

I will check it, step by step, and come back to you

If there is no answer of mine, please remind me

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.
Moderators: ForumSupport
Time to create page: 0.075 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!