My aim is to have a Toolbar Button or Custom Button
When a user clicks on it, add record dialog form is displayed, the user enters some values, in this case (Offer Status, Effective Date, Closing Date), on Submit button, the values of the form are passed to the INSERT SELECT query.
Below is the INSERT SELECT query
$g->execute_query(“INSERT INTO courses_on_offer (session_id,course_code,offer_status,effective_date,closing_date) SELECT s.session_id, c.course_code, ‘$offer_status’, ‘$effective_date’, ‘$closing_date’ FROM sessions s CROSS JOIN programme_courses c WHERE c.id IN ($selected_ids)”);
The italicized values (‘$offer_status’, ‘$effective_date’, ‘$closing_date’ ) should be passed from the add record dialog. Other values (session_id,course_code) are selected from table sessions and programme_courses
I hope this is clear now
Abu Ghufran - Dev Team
PHP Grid Framework
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!