Solved

Is there a way to update a row in an HTML table without having to query a database?

Posted on 2011-02-16
12
927 Views
Last Modified: 2013-12-13
Hello all,
I have been working with an excel speadsheet to track moving items from 1 remote location to another location. This is a 2 person task, basically, the person at 1 location, notates the spreadsheet when they ship an item, and the second person notates the spreadsheet when they receive the item. This process works fine, however, being the ever perfectionist I am, I am wondering if there is a way to web-erize this process. :)

Basically what I would like to do if create a table in html, and populate this table with rows for every week in the year. Now the items that are shipped are based on a specific date, so their would be a column notated that date. Then there would be several columns that would have user input. (where the 2 workers update the date sent, and date received.) - There would also be 1 additional column to indicate any comments for the shipment.
Quick screenshot of how it might look..
My 1st question - Is there a way to do this using php, without having to create a database, or is it possible to use something like jquery or ajax to fill each row as the change is made, using a button as a confirmation/acknowledgment? if not - does anyone have any tips or suggestions on how to accomplish this?

2nd Question - Is it possible that when a row is updated, this script could send a quick generated email letting the other party know that the item has been acknowledged?

3rd Question - Would this script be able to archive data saved at the end of the year?

So - These questions are obviously progressive in nature.
Thank you all for your time, and help!
Chris
0
Comment
Question by:udsfsg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
12 Comments
 
LVL 10

Assisted Solution

by:ollyatstithians
ollyatstithians earned 100 total points
ID: 34906874
Hi udsfsq,
1 - This really IS a database kind of thing. The problems you will have trying to do this without a db (ie. create your own dbms to avoid using one) will be far greater than just setting one up, which really isn't that hard. I personally wouldn't bother with AJAX etc. for this.
2 - Emailing from PHP is easy, there are loads of solutions here on EE about just this. Start off by checking out the PHP manual for the mail() function.
3 - You possibly wouldn't need to archive anything, as it would already be stored in a database. You might want to look at backing up the data though.
0
 
LVL 10

Expert Comment

by:ollyatstithians
ID: 34906889
Do you have a separate spreadsheet for each item?
If so, it would be worth adding columns for an item id and a location id and removing your return columns to reduce duplication.
0
 
LVL 2

Author Comment

by:udsfsg
ID: 34907093
no, I create a new spreadsheet once a year, and just keep to old spreadsheet for an additional year before deleting it.

I had begun exploring something like flexigrid as a possible solution -  http://code.google.com/p/flexigrid/

however, the combination of fixed static fields and dynamic updating fields seems to ever complicate this.
This is what lead me to reach out to the community to see if anyone else had tried to do something like this before.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 2

Author Comment

by:udsfsg
ID: 34907100
I don't mind doing it in a db, I was thinking it might be an easier coding project if it wasn't, since I don't really wanna keep this information permanently.
0
 
LVL 2

Author Comment

by:udsfsg
ID: 34907112
Here's a related question - Has anyone successfully embedded a working excel 2010 spreadsheet into a php page?
If yes - How did you do it?
0
 
LVL 10

Expert Comment

by:ollyatstithians
ID: 34907521
Why not just use GoogleDocs?
0
 
LVL 2

Author Comment

by:udsfsg
ID: 34907536
this is internal, on our intranet.
0
 
LVL 2

Author Comment

by:udsfsg
ID: 34908036
I almost thought I could do this with a spry dataset, but it doesn't appear that you can edit the entries. :(
0
 
LVL 82

Expert Comment

by:leakim971
ID: 34910925
My 1st question - Is there a way to do this using php, without having to create a database, or is it possible to use something like jquery or ajax to fill each row as the change is made, using a button as a confirmation/acknowledgment? if not - does anyone have any tips or suggestions on how to accomplish this?

Check this page : http://www.sqlite.org/serverless.html
Main page of course: http://www.sqlite.org/

>2nd Question - Is it possible that when a row is updated, this script could send a quick generated email letting the other party know that the item has been acknowledged?
Using ajax you can send silently the content of the mail to the php server as @ollyatstithians suggested it

>3 - You possibly wouldn't need to archive anything, as it would already be stored in a database. You might want to look at backing up the data though.
If you don't want to use sqlite for example you can store all the data in a CSV file but it's a bad idea

>Here's a related question - Has anyone successfully embedded a working excel 2010 spreadsheet into a php page?
Not me, but have a look here : http://phpexcel.codeplex.com/
0
 
LVL 2

Author Comment

by:udsfsg
ID: 34916735
HI leak. I actually have mysql, I was simply asking if their was an easier way then developing all the tables etc. (more like iterate the rows & columns, and store it text based.) I've since just created all the tables.. It seems it was quicker then I thought.. ;)

I've played with all the examples from phpexcel, and I cannot seem to get it to actually show anything. It creates the spreadsheet based on the inputs, but doesn't show it inline on the page..  In first reading about this, I get the feeling its supposed to read the excel page into memory and print it on the page, however, I don't see it actually doing this..
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 400 total points
ID: 34916976
ah OK. Once you've the table check this jQuery plugin : http://www.datatables.net/
FMHO flexigrid is too young : Loading and displaying the data is easy, understanding it too but it seems you want to do updates, add records and you should find more ressources with jquery datatables.

If you really need to work with excel file, you can play with excel API else, as you know, it's not a database and manipulate records may be hard
0
 
LVL 2

Author Closing Comment

by:udsfsg
ID: 34919616
Thanks guys, I think the combination of php code, mysql backend and datatables jquery will fit the bill! Much appreciate the suggestions.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question