I wanted to ask this situation, whether it is possible to be done under dhtmlxgrid.
As per dhtmlxgrid example, dhtmlxgrid allows column to be moved and later update back to table.
My question is,
-
if I move Column 1 (Book Title) to position 3, will the php update the table correctly because now my Column 3 equivalent to Book Title and of course the below php code updated wrongly, I assume $_GET[“c3”] is column 3.
$sql = “UPDATE samples_grid SET sales='”.$_GET[“c0”].“',
title= '”.addslashes($_GET[“c1”]).“',
author= '”.addslashes($_GET[“c2”]).“',
price= '”.$_GET[“c3”].“',
instore= '”.$_GET[“c4”].“',
shipping= '”.$_GET[“c5”].“',
bestseller= '”.$_GET[“c6”].“',
pub_date= '”.$_GET[“c7”].“’
WHERE book_id=”.$_GET[“gr_id”]; -
How do I know programmatically that Column 3 now contains Book Title values?
-
Is variables c0 to c7 and gr_id defined by dhtmlxgrid? Can I change this variable name?
Pls see the screenshot below, before move and after move of the columns
Before move
After move