当前位置: 首页>>代码示例>>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;未经允许,请勿转载。