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


PHP Sql::update_task_size方法代碼示例

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


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

示例1: set_include_path

 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// FIXME: Use a host that better supports PHP include paths...
set_include_path(get_include_path() . PATH_SEPARATOR . '/customers/tasktaste.com/tasktaste.com/httpd.www/phpincludes');
require_once 'TaskTaste/tasktaste.php';
$project_id = Utils::get_id_from_post(PROJECT_ID);
$sequence_number = Utils::get_id_from_post(TASK_SEQUENCE_NUMBER);
$task_name = Utils::get_name_from_post(TASK_NAME);
if ($task_name == NULL || strlen($task_name) <= 0) {
    $new_name = TASKTASTE_NEW_TASK_NAME_PART1 . $sequence_number . TASKTASTE_NEW_TASK_NAME_PART2;
} else {
    $new_name = $task_name;
}
$task = Sql::create_task($project_id);
if ($task) {
    $task = Sql::update_task_name($task->get_id(), $new_name);
}
if ($task) {
    $task = Sql::update_task_size($task->get_id(), TASKTASTE_NEW_TASK_SIZE);
}
Utils::output_ajax_result($task);
開發者ID:rafaelbeckel,項目名稱:task-taste,代碼行數:31,代碼來源:create-task.php

示例2: set_include_path

<?php

/*
 * Copyright 2011 Martin Nordholts <martin@chromecode.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// FIXME: Use a host that better supports PHP include paths...
set_include_path(get_include_path() . PATH_SEPARATOR . '/customers/tasktaste.com/tasktaste.com/httpd.www/phpincludes');
require_once 'TaskTaste/tasktaste.php';
$task_id = Utils::get_id_from_post(TASK_ID);
// First set the size so trigger a refresh of the 'work left' value
$task = Sql::update_task_size($task_id, 0);
// Now remove it
$task = Sql::delete_task($task_id);
Utils::output_ajax_result($task);
開發者ID:rafaelbeckel,項目名稱:task-taste,代碼行數:26,代碼來源:delete-task.php

示例3: set_include_path

// FIXME: Use a host that better supports PHP include paths...
set_include_path(get_include_path() . PATH_SEPARATOR . '/customers/tasktaste.com/tasktaste.com/httpd.www/phpincludes');
require_once 'TaskTaste/tasktaste.php';
// Create the project
$unsafe_name = Utils::get_name_from_post(PROJECT_NAME);
$userid = Utils::get_id_from_post(USERID);
$username = Sql::get_user_name_from_id($userid);
if ($username) {
    // Create project
    $project = Sql::create_project($unsafe_name, $userid);
    if ($project) {
        $project_id = $project->get_id();
        // Setup default settings
        Sql::set_worked_per_week($project_id, 1.0);
        Sql::set_project_description($project_id, TASKTASTE_DEFAULT_PROJECT_DESCRIPTION);
        // Create default tasks
        // Task 1
        $task1 = Sql::create_task($project_id);
        if ($task1) {
            Sql::update_task_name($task1->get_id(), TASKTASTE_FIRST_TASK_NAME);
            Sql::update_task_size($task1->get_id(), TASKTASTE_FIRST_TASKS_SIZE);
        }
        // Task 2
        $task2 = Sql::create_task($project_id);
        if ($task2) {
            Sql::update_task_name($task2->get_id(), TASKTASTE_SECOND_TASK_NAME);
            Sql::update_task_size($task2->get_id(), TASKTASTE_FIRST_TASKS_SIZE);
        }
    }
}
Utils::output_ajax_result($project);
開發者ID:rafaelbeckel,項目名稱:task-taste,代碼行數:31,代碼來源:create-project.php


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