Work question/problem/issue.. inserting variables.. Drupal
Posted: Sat Nov 06, 2010 12:44 pm
I’m having an issue with a reporting project at work. I’m fairly new to PHP but I’m good with HTML and MySQL and I’m trying to do something a little beyond my PHP knowledge so I could use a little help. This is a Drupal site so PHP is a must.
Here is my issue:
I need to take a SELECT COUNT query and report the count within certain dates and display it on a table on the page. I have the query written with variables in place and ready to go.
I have a MySQL table with 5 pieces of info in it.
Table: ID(PK, auto-incremented), campaign_name, from_date, to_date, decription
I already have the form built and working to insert values in to these fields, which I will do manually so that’s not the issue.
The thing that I need is a page with all of the campaign names/descriptions listed and linked to their specific count page… or even display it on the current page. So, by clicking on a campaign name it will insert the dates of that campaign in to the MySQL query and display the count.
How can I fully automate this whole process? (other than the initial data entry) I don’t want to have to create a new page for each campaign.. it needs to be automatic so that when a campaign is entered in to the database you can go to the report page and the link will be ready to click and find the count.
That’s really it.. I’m not looking for anyone to code it for me, or anything like that. I just need to know what to do to make this efficient and work the way it is supposed to. I know this issue would not be hard for someone who is good at PHP or even just development in general so any help is appreciated.
Thanks in advance!
Here is my issue:
I need to take a SELECT COUNT query and report the count within certain dates and display it on a table on the page. I have the query written with variables in place and ready to go.
I have a MySQL table with 5 pieces of info in it.
Table: ID(PK, auto-incremented), campaign_name, from_date, to_date, decription
I already have the form built and working to insert values in to these fields, which I will do manually so that’s not the issue.
The thing that I need is a page with all of the campaign names/descriptions listed and linked to their specific count page… or even display it on the current page. So, by clicking on a campaign name it will insert the dates of that campaign in to the MySQL query and display the count.
How can I fully automate this whole process? (other than the initial data entry) I don’t want to have to create a new page for each campaign.. it needs to be automatic so that when a campaign is entered in to the database you can go to the report page and the link will be ready to click and find the count.
That’s really it.. I’m not looking for anyone to code it for me, or anything like that. I just need to know what to do to make this efficient and work the way it is supposed to. I know this issue would not be hard for someone who is good at PHP or even just development in general so any help is appreciated.
Thanks in advance!