function z__schools_apply_draft_changes
Search API
7.x schools.module | z__schools_apply_draft_changes() |
6.x schools.module | z__schools_apply_draft_changes() |
Implements hook_apply_draft_changes
This runs when the user "applies draft changes". We want to copy from our draft_ table to our production table.
File
- modules/
schools/ schools.module, line 1227 - Schools module.
Code
function z__schools_apply_draft_changes() {
/*
$table_name = "schools_data";
$draft_table_name = "draft_$table_name";
// First, truncate existing...
$query = "truncate table $table_name";
$res = db_query($query);
// Now, copy in draft changes...
$query = "INSERT INTO $table_name
SELECT * FROM $draft_table_name ";
$res = db_query($query);
*/
}