本文整理汇总了PHP中Sql::addtion方法的典型用法代码示例。如果您正苦于以下问题:PHP Sql::addtion方法的具体用法?PHP Sql::addtion怎么用?PHP Sql::addtion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sql
的用法示例。
在下文中一共展示了Sql::addtion方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$cstFieldValidators = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from cst_field_validator";
Sql::splice($sql, CstFieldValidatorDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$cstFieldValidator = new CstFieldValidator();
$cstFieldValidator->setId($row['id']);
$cstFieldValidator->setFieldId($row['field_id']);
$cstFieldValidator->setValidatorId($row['validator_id']);
array_push($cstFieldValidators, $cstFieldValidator);
}
$stmt->closeCursor();
return $cstFieldValidators;
}
示例2: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$cstKlasss = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from cst_klass";
Sql::splice($sql, CstKlassDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$cstKlass = new CstKlass();
$cstKlass->setId($row['id']);
$cstKlass->setTble($row['tble']);
$cstKlass->setKlass($row['klass']);
$cstKlass->setLabel($row['label']);
array_push($cstKlasss, $cstKlass);
}
$stmt->closeCursor();
return $cstKlasss;
}
示例3: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$tmpProjects = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from tmp_project";
Sql::splice($sql, TmpProjectDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$tmpProject = new TmpProject();
$tmpProject->setId($row['id']);
$tmpProject->setName($row['name']);
$tmpProject->setCreateTime($row['create_time']);
$tmpProject->setUpdateTime($row['update_time']);
array_push($tmpProjects, $tmpProject);
}
$stmt->closeCursor();
return $tmpProjects;
}
示例4: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$metaTables = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from meta_table";
Sql::splice($sql, MetaTableDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$metaTable = new MetaTable();
$metaTable->setId($row['id']);
$metaTable->setDatabaseId($row['database_id']);
$metaTable->setDatabaseName($row['database_name']);
$metaTable->setName($row['name']);
$metaTable->setKeyId($row['key_id']);
$metaTable->setKeyName($row['key_name']);
array_push($metaTables, $metaTable);
}
$stmt->closeCursor();
return $metaTables;
}
示例5: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$metaFields = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from meta_field";
Sql::splice($sql, MetaFieldDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$metaField = new MetaField();
$metaField->setId($row['id']);
$metaField->setDatabaseId($row['database_id']);
$metaField->setDatabaseName($row['database_name']);
$metaField->setKlassId($row['klass_id']);
$metaField->setKlassName($row['klass_name']);
$metaField->setLabel($row['label']);
$metaField->setName($row['name']);
$metaField->setType($row['type']);
$metaField->setShortType($row['short_type']);
$metaField->setGetter($row['getter']);
$metaField->setSetter($row['setter']);
$metaField->setColumnId($row['column_id']);
$metaField->setColumnName($row['column_name']);
$metaField->setWidth($row['width']);
$metaField->setLength($row['length']);
$metaField->setIsKey($row['is_key']);
$metaField->setIsCondition($row['is_condition']);
$metaField->setIsRequired($row['is_required']);
$metaField->setIsRemote($row['is_remote']);
$metaField->setValidators($row['validators']);
$metaField->setInputType($row['input_type']);
array_push($metaFields, $metaField);
}
$stmt->closeCursor();
return $metaFields;
}
示例6: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$metaColumns = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from meta_column";
Sql::splice($sql, MetaColumnDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$metaColumn = new MetaColumn();
$metaColumn->setId($row['id']);
$metaColumn->setDatabaseId($row['database_id']);
$metaColumn->setDatabaseName($row['database_name']);
$metaColumn->setTableId($row['table_id']);
$metaColumn->setTableName($row['table_name']);
$metaColumn->setName($row['name']);
$metaColumn->setType($row['type']);
$metaColumn->setComment($row['comment']);
$metaColumn->setIsKey($row['is_key']);
array_push($metaColumns, $metaColumn);
}
$stmt->closeCursor();
return $metaColumns;
}
示例7: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$tmpDataTemplates = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from tmp_data_template";
Sql::splice($sql, TmpDataTemplateDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$tmpDataTemplate = new TmpDataTemplate();
$tmpDataTemplate->setId($row['id']);
$tmpDataTemplate->setDatabaseId($row['database_id']);
$tmpDataTemplate->setDatabaseName($row['database_name']);
$tmpDataTemplate->setTableId($row['table_id']);
$tmpDataTemplate->setTableName($row['table_name']);
$tmpDataTemplate->setName($row['name']);
$tmpDataTemplate->setMode($row['mode']);
$tmpDataTemplate->setContent($row['content']);
$tmpDataTemplate->setCreateTime($row['create_time']);
$tmpDataTemplate->setUpdateTime($row['update_time']);
array_push($tmpDataTemplates, $tmpDataTemplate);
}
$stmt->closeCursor();
return $tmpDataTemplates;
}
示例8: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$cstFields = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from cst_field";
Sql::splice($sql, CstFieldDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$cstField = new CstField();
$cstField->setId($row['id']);
$cstField->setClmn($row['clmn']);
$cstField->setField($row['field']);
$cstField->setLabel($row['label']);
$cstField->setType($row['type']);
$cstField->setWidth($row['width']);
$cstField->setLength($row['length']);
$cstField->setIsCondition($row['is_condition']);
$cstField->setIsRequired($row['is_required']);
$cstField->setIsRemote($row['is_remote']);
array_push($cstFields, $cstField);
}
$stmt->closeCursor();
return $cstFields;
}
示例9: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$metaDatabases = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from meta_database";
Sql::splice($sql, MetaDatabaseDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$metaDatabase = new MetaDatabase();
$metaDatabase->setId($row['id']);
$metaDatabase->setName($row['name']);
$metaDatabase->setUrl($row['url']);
$metaDatabase->setUsername($row['username']);
$metaDatabase->setPassword($row['password']);
$metaDatabase->setType($row['type']);
$metaDatabase->setCreater($row['creater']);
$metaDatabase->setUpdater($row['updater']);
$metaDatabase->setCreateTime($row['create_time']);
$metaDatabase->setUpdateTime($row['update_time']);
array_push($metaDatabases, $metaDatabase);
}
$stmt->closeCursor();
return $metaDatabases;
}
示例10: results
/**
* 查询记录集
* @return array
*/
static function results($query = null)
{
$pdo = Database::pdo();
$basAttachments = array();
$params = $query->getParameters();
$ops = $query->getOperators();
$sql = "select * from bas_attachment";
Sql::splice($sql, BasAttachmentDao::$fields, $params, $ops);
Sql::addtion($sql, $query);
$stmt = $pdo->prepare($sql);
Sql::params($stmt, $params);
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$basAttachment = new BasAttachment();
$basAttachment->setId($row['id']);
$basAttachment->setModule($row['module']);
$basAttachment->setType($row['type']);
$basAttachment->setName($row['name']);
$basAttachment->setMime($row['mime']);
$basAttachment->setSuffix($row['suffix']);
$basAttachment->setPath($row['path']);
$basAttachment->setAbsolutePath($row['absolute_path']);
$basAttachment->setData($row['data']);
$basAttachment->setStatus($row['status']);
$basAttachment->setCreater($row['creater']);
$basAttachment->setUpdater($row['updater']);
$basAttachment->setCreateTime($row['create_time']);
$basAttachment->setUpdateTime($row['update_time']);
array_push($basAttachments, $basAttachment);
}
$stmt->closeCursor();
return $basAttachments;
}