Hello,
I’m using the GridConnector for PHP.
If I want to show the content of joined database tables I use render_sql which is working well. But when I want to save changes I used render_table which doesn’t work as the system can only fill one database table with this command.
What is the right way to store data in joined database tables?
The following code doesn’t store correctly
if ($conn->is_select_mode()) {
$conn->render_sql("SELECT program_launch_id, program_launch_name, car_line, assembly_id, assembly_rev, assembly_name, assembly_desc FROM bomlist
LEFT JOIN programs ON bomlist.program_l_id = programs.program_launch_id","bomlist.id","program_launch_id,program_launch_name,car_line,assembly_id,assembly_rev,assembly_name,assembly_desc");
} else {
$conn->render_table("bomlist","bomlist.id","program_l_id,car_line,assembly_id,assembly_rev,assembly_name,assembly_desc");
}
and the code
if ($conn->is_select_mode()) {
$conn->render_sql("SELECT program_launch_id, program_launch_name, car_line, assembly_id, assembly_rev, assembly_name, assembly_desc FROM bomlist
LEFT JOIN programs ON bomlist.program_l_id = programs.program_launch_id","bomlist.id","program_launch_id,program_launch_name,car_line,assembly_id,assembly_rev,assembly_name,assembly_desc");
} else {
$conn->render_table("bomlist","bomlist.id","program_l_id,program_launch_name,car_line,assembly_id,assembly_rev,assembly_name,assembly_desc");
}
runs in a MySQL error.
I think my storage concept is wrong. Can you help?