Jump to content

How to get data from multiple tables


aneeb

Recommended Posts

i want to fetch data from multiple tables. they all are similar that is they have same colum names (catalog_product_flat_1,catalog_product_flat_ 2,catalog_product_flat_ 3,catalog_product_flat_ 4.......), but they are not related.Is there any way to do this through stored prcedures or any other way. One more thing these tables will increse in future as the stores of my ecomerce site increases..please help me i am new to this...

Link to comment
Share on other sites

You need to list each table that you want information from, regardless of whether or not it is a union. It may be possible to write multiple queries or a stored procedure that would get all table names and find the ones you're looking for but I don't have experience doing something like that with stored procedures. It wouldn't be difficult to do that by using another script language to get all of the tables, build the query, and then run it.

Link to comment
Share on other sites

  • 3 weeks later...
You need to list each table that you want information from, regardless of whether or not it is a union. It may be possible to write multiple queries or a stored procedure that would get all table names and find the ones you're looking for but I don't have experience doing something like that with stored procedures. It wouldn't be difficult to do that by using another script language to get all of the tables, build the query, and then run it.
you mean build a table of tables?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...