This topic is locked

Creating Daily Archive

10/2/2010 7:44:03 PM
PHPRunner General questions
R
ryanhughes author

Hi all!
I am creating a daily "service board", used mainly to log customer service calls as they come in. I would essentially like to create a new table everyday (via the website, not manually in php runner), and automatically archive that particular day's calls for reference. How can I accomplish this?
Also, as a job is completed, I would like to be able to change the row font to a new color by just clicking an icon on the row.
Any help would be greatly appreciated!

J
jasonfrew 10/4/2010



Hi all!
I am creating a daily "service board", used mainly to log customer service calls as they come in. I would essentially like to create a new table everyday (via the website, not manually in php runner), and automatically archive that particular day's calls for reference. How can I accomplish this?
Also, as a job is completed, I would like to be able to change the row font to a new color by just clicking an icon on the row.
Any help would be greatly appreciated!


Hi
If i were doing something similar i would use a stored procedure in the database. However this will not create the pages to connect back to your application so you can access your archive.
Making a new table everyday holding archived calls probably isnt the most efficient way to run your database or application as the amount of pages created would increase every day.
It would probably be easier to manage your data in the table that initially captures the calls, filter them by date added. Displaying today's calls only on list page. That way you can then search on date and display historical data without having multiple pages/tables
What kind of database are you using.

Is there a reason you want to archive the calls into another table?

Will you be accessing the tables from another application?
Regards
Jason

R
ryanhughes author 10/4/2010

Thanks for the response Jason.
I do not need to create a new table every day. I just need to be able to have a "clean" list everyday for the new day's calls. But I also need to still have the old calls saved. How do I display only the current day's data on the list page?
BTW.. I am using MySQL database and I will not be using another application.

J
jasonfrew 10/5/2010

Hi
My advice is to keep the calls in single table eg. new_calls_table
at the query stage of phprunner you could order the query by date added. That would have the newest records added, listed first so, datetime in descending order
Or you could put a drop down onto your list page that will filter on date added. The following link will give you a starting point.

The code you would have to amend slightly to look at the datetime column in your record and not "company"
http://xlinesoft.com/phprunner/docs/add_dropdown_list_box_with_values_for_search.htm
Hope this helps

J
jasonfrew 10/5/2010
R
ryanhughes author 10/5/2010

Do you know how to make it so it automatically knows the date and time when I input a new call? This would be very useful and save a lot of time.

Sergey Kornilov admin 10/5/2010

Set default value of datetime field to now()

R
ryanhughes author 10/5/2010

What is causing the default time to be incorrect? Where does now() get the time from?

Sergey Kornilov admin 10/6/2010

It gets time from the web server. Most probably your web server is not in the same timezone as you are.