本文整理匯總了PHP中Objects::calculateUranometriaPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Objects::calculateUranometriaPage方法的具體用法?PHP Objects::calculateUranometriaPage怎麽用?PHP Objects::calculateUranometriaPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Objects
的用法示例。
在下文中一共展示了Objects::calculateUranometriaPage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Objects
$object = new Objects();
$db = new database();
$db->login();
// Add a column club to the observer
$sql = "ALTER TABLE observers ADD club varchar(20) NOT NULL default ''";
$run = mysql_query($sql) or die(mysql_error());
// Add a column stdatlas to the observer
$sql = "ALTER TABLE observers ADD stdatlas int(3) NOT NULL default '0'";
$run = mysql_query($sql) or die(mysql_error());
// Correct the uranometriapages
$sql = "SELECT * FROM objects";
$run = mysql_query($sql) or die(mysql_error());
while ($get = mysql_fetch_object($run)) {
$ra = $get->ra;
$dec = $get->decl;
$urano = $object->calculateUranometriaPage($ra, $dec);
$name = $get->name;
$sql2 = "UPDATE objects SET urano = \"{$urano}\" WHERE name = \"{$name}\"";
$run2 = mysql_query($sql2) or die(mysql_error());
}
// Remove some objects from the database
$sql = "DELETE FROM objects WHERE name=\"Eridanus Cluster\"";
mysql_query($sql) or die(mysql_error());
$sql = "UPDATE objects SET alternative_name = \"\" WHERE alternative_name = \"Hyades\"";
$run = mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM objects WHERE name=\"Coalsack\"";
mysql_query($sql) or die(mysql_error());
$sql = "UPDATE objects SET alternative_name = \"\" WHERE alternative_name = \"Small Magellanc Cl\"";
$run = mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM objects WHERE name=\"Lg Magellanic Cl\"";
mysql_query($sql) or die(mysql_error());