insert($clause); } function bossa_batch_create($appid, $name, $calibration) { $now = time(); $c = $calibration?"1":"0"; return BossaBatch::insert("(create_time, app_id, name, calibration) values ($now, $appid, '$name', $c)"); } function bossa_app_lookup($name) { $app = BossaApp::lookup("short_name='$name'"); if (!$app) return 0; return $app->id; } ?>