function _hosting_package_temporary_table in Hosting 6.2
Same name and namespace in other branches
- 7.4 package/hosting_package.instance.inc \_hosting_package_temporary_table()
- 7.3 package/hosting_package.instance.inc \_hosting_package_temporary_table()
2 calls to _hosting_package_temporary_table()
- hosting_migrate_comparison in migrate/
hosting_migrate.module - Compare package schema versions between the current and target platform in temp tables
- hosting_package_comparison in package/
hosting_package.instance.inc
File
- package/
hosting_package.instance.inc, line 310 - API for mapping packages to various Hosting node types
Code
function _hosting_package_temporary_table($ref) {
static $names = array();
if (!isset($names[$ref])) {
// Generate a unique table name for this $ref.
$names[$ref] = '_hosting_comparision_' . trim($ref);
// Create the temporary table.
db_query("CREATE TEMPORARY TABLE %s AS SELECT p.nid, p.short_name, p.old_short_name, i.version_code, i.schema_version, i.version, i.status FROM {hosting_package} p LEFT JOIN {hosting_package_instance} i on p.nid = i.package_id WHERE i.rid = %d and i.platform != -1", $names[$ref], $ref);
}
return $names[$ref];
}