ALTER TABLE report_params ADD COLUMN `specific_org_type` SMALLINT(3) NULL AFTER `annual_rpt_sort`; UPDATE report_params SET specific_org_type = 1 WHERE rpt_id IN(42, 72, 66, 67, 63); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(68, 'new_features.php', 'New Features Highlights', 'Y', 'https://www.spcstardoc.com/dmsv10/TCPDF/reports/', 2, NULL, 'Y', 'Y'); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(73, 'client_benefits.php', 'Benefits of Partnering With SPC - Clients', 'Y', 'https://www.spcstardoc.com/dmsv10/TCPDF/reports/', 35, NULL, 'Y', 'Y'); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(75, 'in_the_pipeline.php', 'In The Pipeline', 'Y', 'https://www.spcstardoc.com/dmsv10/TCPDF/reports/', 140, NULL, 'Y', 'Y'); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(77, 'vendor_categories.php', 'New Vendor Categories', 'Y', 'https://www.spcstardoc.com/dmsv10/TCPDF/reports/', 141, NULL, 'Y', 'Y'); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(87, 'annual_split_report_cover_page.php', 'Annual Split Report Cover Page', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 1, NULL, 'Y', 'Y'); annual_split_report_cover_page.php INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(88, 'proj_equip_costs_bldg_upgrade.php', 'Projected Equipment Costs By Building - Black - Upgrade', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 76, NULL, 'Y', 'Y'); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(88, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(88, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(89, 'proj_equip_costs_bldg_color_upgrade.php', 'Projected Equipment Costs By Building - Color - Upgrade', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 81, NULL, 'Y', 'Y'); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(89, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(89, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(90, 'avg_student_to_copy_usage_upgrade.php', 'Average Student To Copy Usage - Black - Upgrade', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 36, NULL, 'Y', 'Y'); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(90, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(90, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(91, 'avg_student_to_copy_usage_color_upgrade.php', 'Average Student To Copy Usage - Color - Upgrade', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 56, NULL, 'Y', 'Y'); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(91, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(91, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); INSERT into report_params (rpt_id, rpt_object, rpt_label, rpt_opt_id, rpt_filepath, annual_rpt_sort, specific_org_type, common_report, rpt_pdf) VALUES(92, 'color_tot_vol_compare_upgrade.php', 'Color To Total Volume Comparison - Upgrade', 'Y', 'https://www.spcstardoc.com/dms/TCPDF/reports/', 64, NULL, 'Y', 'Y'); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(92, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(92, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(77, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(75, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); SELECT * FROM report_params WHERE annual_rpt_sort IS NOT NULL ORDER BY annual_rpt_sort DESC; insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(68, "$org_id", "$_GET['id']", "The org_id to base this report on.", "client"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(60, "$schoolYear", "$_GET['schYear']", "The 2 digit school year.", "year"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(64, "$vend", "$_GET['vend']", "This will be the org id of the vendor (where org_type = 7", "vendor"); insert into var_mapping (master_id, var_name, get_post_name, notes, col_name) VALUES(64, "$grpBy", "$_GET['sortBy']", "Group report data by Building or Department", "groupBy"); $org_id = 18; $schYear = 17;