Hello,
Can someone tell me how I can I could work this around.
I use dhtmlxform to load some data from a table.
I actually just need to display this data (no need to edit)
Here’s an example of my data :
id => 1 // Primary Key and auto incremented value
datec => 2012-07-12 // Secondary Key and Unique
col1 => info1
col2 => info2
The default data should be displayed on page load depending the current day.
Here’s the line I use to init data load using dhtmlxconnector :
myForm.load(‘myfile.php?datec=’+date); // date is a calculated variable (it gives the current date formated Y-m-d)
Here’s my php file :
$res = mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
$form = new FormConnector($res, “MySQL”);
$sql = "select datec, col1, col2 from mytable";
$sql.= " WHERE datec = '".$datec."'"; // datec is a $_GET variable
$form->render_sql($sql, "id", "datec, col1, col2");
But, finally, on page load, I get this message error : “Uncaught exception ‘Exception’ with message ‘ID parameter is missed’ in…”;
I tested in adding an ID parameter :
myForm.load(‘myfile.php?id=1&datec=’+date);
and, in this case, it works…
Is this “ID” parameter really mandatory ? Or could you advise a way to work this around ?
Thanks for your help