Help updating database with jEditables

Help updating database with jEditables

mrmistermrmister Posts: 2Questions: 0Answers: 0
edited March 2014 in Plug-ins
I apologize if this is a dumb question or I didn't explain myself well enough. Could really use some help.

I'm trying to update my database table, using Datatables and jEditable and Coldfusion.

I've got an ID column(company_id) in my Datatables instance but I'm not including every record from my SQL table, so there is a different number of rows(row 30 in my datatables table might have a company_id of 50 in my Sql table)
I can get the column name to come across but using RowID returns the index number of the rows in Datatables, when I need the ID value from my ID column, which is the value of company_id. I need help setting rowId equal to company_id so the correct row is updated.


My sql statement
[code]
UPDATE sales
SET #columnName#="#value#"
WHERE company_id= "#rowId#";
[/code]

I tried to explain that as well as i could. Thanks in advance.

Replies

  • kanwar245kanwar245 Posts: 6Questions: 0Answers: 0
    This might help but I'm not sure how much of an impact it would have on the performance. When you're loading information in your table, have an id for each row. This id is nothing but the company_id that you're loading up from the SQL table. Then later when you have to update any row, you can use that id information and pass it through along with other information using jEditable to your php script. Hope that helps.
This discussion has been closed.