Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $col = array();
- $col["title"] = "Total ordered";
- $col["name"] = "total_order";
- $col["search"] = true;
- $col["editable"] = false;
- $cols[] = $col;
- $g->select_command = "SELECT m.material_id, SUM(orders.material_quantity) as total_order
- FROM materials m
- LEFT JOIN orders
- ON m.material_id = orders.material_id
- GROUP BY m.material_id
- ";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement