本文整理汇总了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());