</head> <body> <pre> <?php # # Scan all tables, look for the demo table and delete it. # echo "scanning tables...\n"; $tables = $client->getTableNames(); sort($tables); foreach ($tables as $name) { echo " found: {$name}\n"; if ($name == $t) { if ($client->isTableEnabled($name)) { echo " disabling table: {$name}\n"; $client->disableTable($name); } echo " deleting table: {$name}\n"; $client->deleteTable($name); } } # # Create the demo table with two column families, entry: and unused: # $columns = array(new ColumnDescriptor(array('name' => 'entry:', 'maxVersions' => 10)), new ColumnDescriptor(array('name' => 'unused:'))); echo "creating table: {$t}\n"; try { $client->createTable($t, $columns); } catch (AlreadyExists $ae) { echo "WARN: {$ae->message}\n"; }