try this one, at least it works for me.
Create a table (temporarily) that matches your array. You only need it to design your grid, when you’re done you can drop the table.
In the onScriptInit event:
foreach($your_array as $row)
$inserts = “(”.$row.",’".$row."’,’".$row."’)"; // if you don’t have any string values you could also use: “(”. implode(’,’,$row).")",
$values = implode(’,’,$inserts);
sc_exec_sql(“CREATE TEMPORARY TABLE IF NOT EXISTS memtab (mem_id INT, r_date DATE, o_date DATE)”); //use the same names as in your grid’s SQL statement
sc_exec_sql(“INSERT INTO memtab VALUES $values”);
Don’t pay any attention to an error on compile time that’s complaining about a missing table.
There is no actual table in your db it only exists in memory at run time, visible to the current connection only and is dropped automatically.
See if it works.