當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Objects::calculateTakiPage方法代碼示例

本文整理匯總了PHP中Objects::calculateTakiPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Objects::calculateTakiPage方法的具體用法?PHP Objects::calculateTakiPage怎麽用?PHP Objects::calculateTakiPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Objects的用法示例。


在下文中一共展示了Objects::calculateTakiPage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: objectnames

$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"M 51\", \"\", \"Whirlpool Galaxy\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"IC 4593\", \"\", \"White Eyed Pea\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"M 11\", \"\", \"Wild Duck Cluster\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"M 40\", \"\", \"Winnecke 4 (WNC4)\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"IC 2118\", \"\", \"Witch Head Nebula\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"NGC 2264\", \"\", \"X-mas Tree Cluster\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"Blanco 1\", \"\", \"Zeta Sculptoris Cluster\")";
$run = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO objectnames ( objectname, catalog, catindex ) VALUES (\"UGC 6955\", \"\", \"Zwicky #2\")";
$run = mysql_query($sql) or die(mysql_error());
// Insert the taki pages
$object = new Objects();
$sql = "ALTER TABLE objects ADD COLUMN taki varchar(3) NOT NULL default ''";
$run = mysql_query($sql) or die(mysql_error());
$sql = "SELECT * FROM objects";
$run = mysql_query($sql) or die(mysql_error());
while ($get = mysql_fetch_object($run)) {
    $ra = $get->ra;
    $dec = $get->decl;
    $taki = $object->calculateTakiPage($ra, $dec);
    $name = $get->name;
    $sql2 = "UPDATE objects SET taki = \"{$taki}\" WHERE name = \"{$name}\"";
    $run2 = mysql_query($sql2) or die(mysql_error());
}
echo "Database was updated succesfully!\n";
開發者ID:rolfvandervleuten,項目名稱:DeepskyLog,代碼行數:31,代碼來源:updatev3.0-v3.1.php

示例2: database

<?php

include_once "../lib/database.php";
include_once "../lib/objects.php";
$db = new database();
$db->login();
$object = new Objects();
// Insert the taki pages
$sql = "ALTER TABLE objects ADD COLUMN taki varchar(3) NOT NULL default ''";
$run = mysql_query($sql) or die(mysql_error());
$sql = "SELECT * FROM objects";
$run = mysql_query($sql) or die(mysql_error());
while ($get = mysql_fetch_object($run)) {
    $ra = $get->ra;
    $dec = $get->decl;
    $taki = trim($object->calculateTakiPage($ra, $dec));
    $name = $get->name;
    $sql2 = "UPDATE objects SET taki = \"{$taki}\" WHERE name = \"{$name}\"";
    $run2 = mysql_query($sql2) or die(mysql_error());
}
開發者ID:rolfvandervleuten,項目名稱:DeepskyLog,代碼行數:20,代碼來源:updatev3.0-v3.1a.php


注:本文中的Objects::calculateTakiPage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。