I have the creation of databases with remote api working but scratching my head on how to get the info to delete them. The parameter required is $database_id, but how can I find that info? The app I trying to work with creates/deletes db's and the only info I have for deletion is the web_domain id, dbname, and dbuser to work with. Looking thru the available remote api examples I don't see anyway to do it without resorting to writing php code connecting to the master ispconfigdb table and querying by dbname in the web_database table to get the $database_id
$db = $client->sites_database_get($session_id, array('database_name' => 'abcd')); $client->sites_database_delete($session_id, $db['database_id'])
Till, Thank you very much! Jack of all trades and one of those trades is playing at being a programmer
If any kind soul could point out what I'm doing wrong I would appreciate it I am trying to delete a database and only know the database name. tried $dbname = "c1_test_db"; $db = $client->sites_database_get($session_id, array('database_name' => $dbname)); $db_id = intval($db['database_id']); echo $db_id; I can never get the database id and then print it out. Probably something simple I'm missing but I can't figure it out. Anybody give me a hint as to what I'm doing wrong? Thanks!