Please help me 🙂
I've a table:
TABLE1
– ID
– S_N
– DATE
TABLE2
– ID
– S_N
_ STATUS
For default i've read that is passed the (PK) rowid, how i can pass the S_N?
so i can make a select like this
select * from table2 where table2.s_n = table1.s_n
Thanks
1 Answers
In master grid, you can set extra subgrid params in this way.
$opt["subgridparams"] = "s_n";
$grid->set_options($opt)
And in detail grid, you can use that param in sql command.
$sn = intval($_GET["s_n"]);
$grid->select_command = "select * from table2 where table2.s_n = $sn";
Refer demos/master-detail/master-detail.php.
Your Answer