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
923 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
  • 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Creating and Managing Databases with phpMyAdmin in cPanel.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now