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: 246 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. |
tudsy |
Sep 4 2018, 11:49 PM
Post
#2
|
Advanced Member Group: Members Posts: 246 Joined: 30-September 14 Member No.: 21,611 |
Hi
Thanks for that. I renamed the column names with different names. I have now decided to go with a simple select statement. $query ="SELECT Customers.Customersitemid,Customers.email,Customers.name,Customers.Price,Customers.terms,Customers.Age,Customers.Date,Customers.Softbought,CustomersArt.CustomersArtitemid,CustomersArt.nameof,CustomersArt.Priceofart,CustomersArt.Dateof,CustomersArt.termsof,CustomersArt.Ageof,CustomersArt.graphic,CustomersArt.emailadd FROM Customers JOIN CustomersArt ON Customers.Customersitemid = CustomersArt.CustomersArtitemid"; But its not working. I cant see what is the problem. Any help will be appreciated. Thanks. |
Lo-Fi Version | Time is now: 26th April 2024 - 10:46 AM |