TOPIC:

Creating a view with data from multiple sources (tables) 2 weeks 6 days ago #261078

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
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) 2 weeks 6 days ago #261111

  • Topic Author
  • Maago
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 158
  • 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) 2 weeks 6 days ago #261115

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
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) 2 weeks 6 days ago #261116

  • Topic Author
  • Maago
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 158
  • 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) 2 weeks 6 days ago #261117

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
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.051 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

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

Special Offer

Summer 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!