Creating a view from multiple tables |
Creating a view from multiple tables |
tudsy |
Aug 5 2018, 11:32 PM
Post
#1
|
Advanced Member Group: Members Posts: 248 Joined: 30-September 14 Member No.: 21,611 |
Hi
I have 4 tables, CustomersArt,Customers,subscribers and emailcomm. My question is, how do i create a view from these 4 tables with the column email ? I have done a view from one table (see below): $query = "CREATE VIEW ecovib2d AS SELECT email FROM CustomersArt"; Any help will be appreciated. |
CharlesEF |
Sep 6 2018, 10:26 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,984 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
That tells me the script did run but returned no results. There might be a logic error in the query. I don't have access to your database so you need to double check that each table/column contains what you think. Example: Are you sure 'Customers.Customersitemid' is equal to 'CustomersArt.CustomersArtitemid'?
This post has been edited by CharlesEF: Sep 6 2018, 10:31 PM |
tudsy |
Sep 6 2018, 10:59 PM
Post
#3
|
Advanced Member Group: Members Posts: 248 Joined: 30-September 14 Member No.: 21,611 |
That tells me the script did run but returned no results. There might be a logic error in the query. I don't have access to your database so you need to double check that each table/column contains what you think. Example: Are you sure 'Customers.Customersitemid' is equal to 'CustomersArt.CustomersArtitemid'? Hi Thanks for that. Here are the contents of the Customers and CustomersArt tables. Thanks. |
Lo-Fi Version | Time is now: 26th September 2024 - 08:06 AM |