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


PHP DatabaseOperation::getRowsNumberOverLimitInSqlStatement方法代码示例

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


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

示例1: getIdFtaByUserAndWorkflow

 /**
  * On récupère les informations des Fta 
  * @param type $paramArrayIdFta
  * @param type $paramOrderBy
  * @return type
  */
 public static function getIdFtaByUserAndWorkflow($paramArrayIdFta, $paramOrderBy, $paramDebut, $paramFtaModificatin)
 {
     if ($paramFtaModificatin) {
         $nbMaxParPage = ModuleConfig::VALUE_MAX_PAR_PAGE;
     } else {
         $nbMaxParPage = ModuleConfig::VALUE_MAX_PAR_PAGE_CONSUL;
         $paramOrderBy = FtaModel::FIELDNAME_DATE_DERNIERE_MAJ_FTA . ' DESC ';
     }
     /**
      * Attention dans la condition where de la requette ne pas mettre des conditions non présente lors de la création de la fta
      * Exemple ClassificationRaccourcisModel::TABLENAME 
      */
     if ($paramArrayIdFta) {
         $array['1'] = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ', ' . FtaEtatModel::FIELDNAME_ABREVIATION . ', ' . FtaModel::FIELDNAME_LIBELLE . ', ' . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . ', ' . FtaWorkflowModel::FIELDNAME_NOM_FTA_WORKFLOW . ', ' . FtaModel::FIELDNAME_NOMBRE_UVC_PAR_CARTON . ', ' . FtaModel::FIELDNAME_POIDS_ELEMENTAIRE . ', ' . FtaModel::FIELDNAME_ID_CLASSIFICATION_RACCOURCIS . ', ' . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . ', ' . FtaModel::FIELDNAME_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_VERSION_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . ', ' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ', ' . FtaModel::FIELDNAME_CREATEUR . ', ' . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . ', ' . FtaModel::FIELDNAME_POURCENTAGE_AVANCEMENT . ', ' . FtaModel::FIELDNAME_LISTE_ID_FTA_ROLE . ', ' . GeoModel::FIELDNAME_GEO . ', ' . FtaModel::TABLENAME . '. ' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaModel::TABLENAME . ',' . UserModel::TABLENAME . ', ' . FtaEtatModel::TABLENAME . ', ' . FtaWorkflowModel::TABLENAME . ', ' . GeoModel::TABLENAME . ' WHERE ( 0 ' . FtaModel::addIdFtaLabel($paramArrayIdFta) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_CREATEUR . '=' . UserModel::TABLENAME . '.' . UserModel::KEYNAME . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . FtaEtatModel::TABLENAME . '.' . FtaEtatModel::KEYNAME . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . '=' . GeoModel::TABLENAME . '.' . GeoModel::KEYNAME . ' ORDER BY ' . $paramOrderBy . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ',' . UserModel::FIELDNAME_PRENOM . ' ASC' . ',' . UserModel::FIELDNAME_NOM . ' ASC' . ',' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ' LIMIT ' . $nbMaxParPage . ' OFFSET ' . $paramDebut);
         $array['2'] = DatabaseOperation::getRowsNumberOverLimitInSqlStatement('SELECT SQL_CALC_FOUND_ROWS ' . FtaModel::TABLENAME . '.' . FtaModel::KEYNAME . ', ' . FtaEtatModel::FIELDNAME_ABREVIATION . ', ' . FtaModel::FIELDNAME_LIBELLE . ', ' . FtaWorkflowModel::FIELDNAME_DESCRIPTION_FTA_WORKFLOW . ', ' . FtaWorkflowModel::FIELDNAME_NOM_FTA_WORKFLOW . ', ' . FtaModel::FIELDNAME_NOMBRE_UVC_PAR_CARTON . ', ' . FtaModel::FIELDNAME_POIDS_ELEMENTAIRE . ', ' . FtaModel::FIELDNAME_ID_CLASSIFICATION_RACCOURCIS . ', ' . FtaModel::FIELDNAME_DESIGNATION_COMMERCIALE . ', ' . FtaModel::FIELDNAME_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_VERSION_DOSSIER_FTA . ', ' . FtaModel::FIELDNAME_CODE_ARTICLE_LDC . ', ' . FtaModel::FIELDNAME_ID_FTA_CLASSIFICATION2 . ', ' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ', ' . FtaModel::FIELDNAME_CREATEUR . ', ' . FtaModel::FIELDNAME_POURCENTAGE_AVANCEMENT . ', ' . FtaModel::FIELDNAME_LISTE_ID_FTA_ROLE . ', ' . GeoModel::FIELDNAME_GEO . ', ' . FtaModel::TABLENAME . '. ' . FtaModel::FIELDNAME_WORKFLOW . ' FROM ' . FtaModel::TABLENAME . ',' . UserModel::TABLENAME . ', ' . FtaEtatModel::TABLENAME . ', ' . FtaWorkflowModel::TABLENAME . ', ' . GeoModel::TABLENAME . ' WHERE ( 0 ' . FtaModel::addIdFtaLabel($paramArrayIdFta) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_CREATEUR . '=' . UserModel::TABLENAME . '.' . UserModel::KEYNAME . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_ID_FTA_ETAT . '=' . FtaEtatModel::TABLENAME . '.' . FtaEtatModel::KEYNAME . ' AND ' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME . '=' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_SITE_PRODUCTION . '=' . GeoModel::TABLENAME . '.' . GeoModel::KEYNAME . ' ORDER BY ' . $paramOrderBy . ',' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . ',' . UserModel::FIELDNAME_PRENOM . ' ASC' . ',' . FtaModel::FIELDNAME_DATE_ECHEANCE_FTA . ' LIMIT ' . $nbMaxParPage . ' OFFSET ' . $paramDebut);
         $array['3'] = DatabaseOperation::convertSqlStatementWithoutKeyToArray('SELECT DISTINCT ' . FtaWorkflowModel::TABLENAME . '.*' . ' FROM ' . FtaModel::TABLENAME . ',' . FtaWorkflowModel::TABLENAME . ' WHERE ( ' . '0' . ' ' . FtaModel::addIdFtaLabel($array['1']) . ')' . ' AND ' . FtaModel::TABLENAME . '.' . FtaModel::FIELDNAME_WORKFLOW . '=' . FtaWorkflowModel::TABLENAME . '.' . FtaWorkflowModel::KEYNAME);
         return $array;
     }
 }
开发者ID:SalokineTerata,项目名称:intranet,代码行数:25,代码来源:UserModel.php


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