Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 56... Línea 56...
56
     * @param string|null $wheresql Where conditions for the SQL
56
     * @param string|null $wheresql Where conditions for the SQL
57
     * @param string|null $sortsql Order by conditions for the SQL
57
     * @param string|null $sortsql Order by conditions for the SQL
58
     * @param int|null $userid The user ID
58
     * @param int|null $userid The user ID
59
     * @return string
59
     * @return string
60
     */
60
     */
61
    protected function generate_get_records_sql(string $wheresql = null, string $sortsql = null, ?int $userid = null): string {
61
    protected function generate_get_records_sql(?string $wheresql = null, ?string $sortsql = null, ?int $userid = null): string {
62
        $selectsql = 'SELECT * FROM {' . self::TABLE . '} ' . $this->get_table_alias();
62
        $selectsql = 'SELECT * FROM {' . self::TABLE . '} ' . $this->get_table_alias();
63
        $selectsql .= $wheresql ? ' WHERE ' . $wheresql : '';
63
        $selectsql .= $wheresql ? ' WHERE ' . $wheresql : '';
64
        $selectsql .= $sortsql ? ' ORDER BY ' . $sortsql : '';
64
        $selectsql .= $sortsql ? ' ORDER BY ' . $sortsql : '';
Línea 65... Línea 65...
65
 
65