当前位置: 首页>>代码示例>>PHP>>正文


PHP Query::setAction方法代码示例

本文整理汇总了PHP中Query::setAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Query::setAction方法的具体用法?PHP Query::setAction怎么用?PHP Query::setAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Query的用法示例。


在下文中一共展示了Query::setAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Query

<?php

if (!defined('__XE__')) {
    exit;
}
$query = new Query();
$query->setQueryId("insertPoint");
$query->setAction("insert");
$query->setPriority("");
${'member_srl249_argument'} = new Argument('member_srl', $args->{'member_srl'});
${'member_srl249_argument'}->checkFilter('number');
${'member_srl249_argument'}->checkNotNull();
if (!${'member_srl249_argument'}->isValid()) {
    return ${'member_srl249_argument'}->getErrorMessage();
}
if (${'member_srl249_argument'} !== null) {
    ${'member_srl249_argument'}->setColumnType('number');
}
${'point250_argument'} = new Argument('point', $args->{'point'});
${'point250_argument'}->checkFilter('number');
${'point250_argument'}->ensureDefaultValue('0');
${'point250_argument'}->checkNotNull();
if (!${'point250_argument'}->isValid()) {
    return ${'point250_argument'}->getErrorMessage();
}
if (${'point250_argument'} !== null) {
    ${'point250_argument'}->setColumnType('number');
}
$query->setColumns(array(new InsertExpression('`member_srl`', ${'member_srl249_argument'}), new InsertExpression('`point`', ${'point250_argument'})));
$query->setTables(array(new Table('`xe_point`', '`point`')));
$query->setConditions(array());
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:point.insertPoint.1.7.8.mysql.cache.php

示例2: Query

<?php

if (!defined('__XE__')) {
    exit;
}
$query = new Query();
$query->setQueryId("getModuleCategories");
$query->setAction("select");
$query->setPriority("");
if (isset($args->moduleCategorySrl)) {
    ${'moduleCategorySrl2_argument'} = new ConditionArgument('moduleCategorySrl', $args->moduleCategorySrl, 'in');
    ${'moduleCategorySrl2_argument'}->createConditionValue();
    if (!${'moduleCategorySrl2_argument'}->isValid()) {
        return ${'moduleCategorySrl2_argument'}->getErrorMessage();
    }
} else {
    ${'moduleCategorySrl2_argument'} = NULL;
}
if (${'moduleCategorySrl2_argument'} !== null) {
    ${'moduleCategorySrl2_argument'}->setColumnType('number');
}
${'sort_index3_argument'} = new Argument('sort_index', $args->{'sort_index'});
${'sort_index3_argument'}->ensureDefaultValue('title');
if (!${'sort_index3_argument'}->isValid()) {
    return ${'sort_index3_argument'}->getErrorMessage();
}
$query->setColumns(array(new StarExpression()));
$query->setTables(array(new Table('`xe_module_categories`', '`module_categories`')));
$query->setConditions(array(new ConditionGroup(array(new ConditionWithArgument('`module_category_srl`', $moduleCategorySrl2_argument, "in")))));
$query->setGroups(array());
$query->setOrder(array(new OrderByColumn(${'sort_index3_argument'}, "asc")));
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:module.getModuleCategories.1.8.15.mysql_innodb.cache.php

示例3: testUpdateQueryWithJoin

 /**
  * Test UPDATE query with a JOIN
  * @group update
  * @covers Query::getQuery
  */
 function testUpdateQueryWithJoin()
 {
     $column_values = array('a.my_column1' => 'value1');
     $q = new Query('my_table', 'ma');
     $q->setAction(Query::ACTION_UPDATE)->setUpdateColumnValues($column_values)->join('other_table ob', 'ob.something = ma.my_column')->add('a.my_column3', array(1, 2, 3));
     $query = $q->getQuery();
     $actual = "{$query}";
     $expected = "UPDATE `my_table` AS ma ";
     $expected .= "JOIN`other_table` AS ob ON (ob.something = ma.my_column)";
     $expected .= "SET`a`.`my_column1`='value1'";
     $expected .= "WHERE `a`.`my_column3` IN (1,2,3)";
     $this->assertEquals(preg_replace('/\\s/', '', $expected), preg_replace('/\\s/', '', $actual));
 }
开发者ID:abcarroll,项目名称:DABL,代码行数:18,代码来源:QueryTest.php

示例4: Query

<?php

if (!defined('__XE__')) {
    exit;
}
$query = new Query();
$query->setQueryId("updatePackage");
$query->setAction("update");
$query->setPriority("");
${'path1_argument'} = new Argument('path', $args->{'path'});
${'path1_argument'}->checkNotNull();
if (!${'path1_argument'}->isValid()) {
    return ${'path1_argument'}->getErrorMessage();
}
if (${'path1_argument'} !== null) {
    ${'path1_argument'}->setColumnType('varchar');
}
${'have_instance2_argument'} = new Argument('have_instance', $args->{'have_instance'});
${'have_instance2_argument'}->checkNotNull();
if (!${'have_instance2_argument'}->isValid()) {
    return ${'have_instance2_argument'}->getErrorMessage();
}
if (${'have_instance2_argument'} !== null) {
    ${'have_instance2_argument'}->setColumnType('char');
}
${'updatedate3_argument'} = new Argument('updatedate', $args->{'updatedate'});
${'updatedate3_argument'}->checkNotNull();
if (!${'updatedate3_argument'}->isValid()) {
    return ${'updatedate3_argument'}->getErrorMessage();
}
if (${'updatedate3_argument'} !== null) {
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:autoinstall.updatePackage.1.8.15.mysql_innodb.cache.php

示例5: Query

<?php

if (!defined('__XE__')) {
    exit;
}
$query = new Query();
$query->setQueryId("deleteModuleExtraVars");
$query->setAction("delete");
$query->setPriority("");
${'module_srl178_argument'} = new ConditionArgument('module_srl', $args->module_srl, 'equal');
${'module_srl178_argument'}->checkFilter('number');
${'module_srl178_argument'}->checkNotNull();
${'module_srl178_argument'}->createConditionValue();
if (!${'module_srl178_argument'}->isValid()) {
    return ${'module_srl178_argument'}->getErrorMessage();
}
if (${'module_srl178_argument'} !== null) {
    ${'module_srl178_argument'}->setColumnType('number');
}
$query->setTables(array(new Table('`xe_module_extra_vars`', '`module_extra_vars`')));
$query->setConditions(array(new ConditionGroup(array(new ConditionWithArgument('`module_srl`', $module_srl178_argument, "equal")))));
$query->setGroups(array());
$query->setOrder(array());
$query->setLimit();
return $query;
开发者ID:umjinsun12,项目名称:dngshin,代码行数:25,代码来源:module.deleteModuleExtraVars.1.7.8.mysql.cache.php

示例6: compare

 /**
  * @param string $packageName
  * @param string $counterName
  * @param float $value
  * @return string
  */
 public function compare($packageName, $counterName, $value)
 {
     $query = new Query();
     $query->setAction(Query::ACTION_COMPARE);
     $query->setPackage($packageName);
     $query->setCounter($counterName);
     $query->setValue($value);
     return $this->query($query);
 }
开发者ID:namelesscoder,项目名称:numerolog,代码行数:15,代码来源:Client.php


注:本文中的Query::setAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。