Sunday, February 10, 2013

Using MySQL to Batch Update Resources in PHPScheduleIt 2.x

PHPScheduleIt is a handy tool for setting up scheduling and resource allocations. However, from my perspective, there seem to be a few limitations from the "application administration" functions from within the interface.

I wanted to set all resources to certain values. This can be easily achieved using MySQL to batch update many or all resources. It's simply a matter of using SQL queries and commands to set the 'resources' table.

For example, a template UPDATE function and all columns names for the resources table are as follows:

UPDATE `resources` SET `resource_id`=[value-1],`name`=[value-2],`location`=[value-3],`contact_info`=[value-4],`description`=[value-5],`notes`=[value-6],`isactive`=[value-7],`min_duration`=[value-8],`min_increment`=[value-9],`max_duration`=[value-10],`unit_cost`=[value-11],`autoassign`=[value-12],`requires_approval`=[value-13],`allow_multiday_reservations`=[value-14],`max_participants`=[value-15],`min_notice_time`=[value-16],`max_notice_time`=[value-17],`image_name`=[value-18],`schedule_id`=[value-19],`legacyid`=[value-20],`admin_group_id`=[value-21],`public_id`=[value-22],`allow_calendar_subscription`=[value-23],`sort_order`=[value-24] WHERE 1




0 comments: