Here's a question. I've tried googling this and I've tried researching problems similar to this, and have been unable to find anything up to this point.
Based off my peers, I've always learned that you research before you ask, because not using the search function can get you a quick smack in the head heh.
I have a db with 7 tables, each table is for each corresponding day of the week.
So on Monday, I would want the query to work for database.table1 and on Tuesday, it would work with database.table2 and so on.
table1 -- table2 -- table3 -- table4 -- table5 -- table6 -- table7
| |
|-------------------------------|----------------------------------------|
|
I know the queries I want to write and can get that part of the code to work, as I'll be doing totals from the queries, row totals, sum totals, and also some queries based off sorts of the data.
My question is, if anyone knows, is how I can get the queries to dynamically work , based on the day of the week.
My first guess would be is that some sort of conditional loop that would work based off the idea.
if (day = Mon){
$tablevariable = datablase.table1
}
etc etc etc.
Anyone have an idea to get me going? Thanks!!!
T