Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 109... Línea 109...
109
     * @param string|null $sortsql Order by conditions for the SQL
109
     * @param string|null $sortsql Order by conditions for the SQL
110
     * @param int|null $userid The ID of the user we are performing this query for
110
     * @param int|null $userid The ID of the user we are performing this query for
111
     *
111
     *
112
     * @return string
112
     * @return string
113
     */
113
     */
114
    protected function generate_get_records_sql(string $wheresql = null, ?string $sortsql = null, ?int $userid = null): string {
114
    protected function generate_get_records_sql(?string $wheresql = null, ?string $sortsql = null, ?int $userid = null): string {
115
        $alias = $this->get_table_alias();
115
        $alias = $this->get_table_alias();
Línea 116... Línea 116...
116
 
116
 
Línea 117... Línea 117...
117
        $includefavourites = $userid ? true : false;
117
        $includefavourites = $userid ? true : false;
Línea 190... Línea 190...
190
     * Build the SQL to be used in count_records_sql.
190
     * Build the SQL to be used in count_records_sql.
191
     *
191
     *
192
     * @param string|null $wheresql Where conditions for the SQL
192
     * @param string|null $wheresql Where conditions for the SQL
193
     * @return string
193
     * @return string
194
     */
194
     */
195
    protected function generate_count_records_sql(string $wheresql = null): string {
195
    protected function generate_count_records_sql(?string $wheresql = null): string {
196
        $alias = $this->get_table_alias();
196
        $alias = $this->get_table_alias();
197
        $db = $this->get_db();
197
        $db = $this->get_db();
Línea 198... Línea 198...
198
 
198
 
199
        $selectsql = "SELECT COUNT(1) FROM {" . self::TABLE . "} {$alias}";
199
        $selectsql = "SELECT COUNT(1) FROM {" . self::TABLE . "} {$alias}";