Jump to content

Recommended Posts

Posted (edited)

This is my select:

{{$limit 	= 20;}}
{{$page 	= (isset( \IPS\Request::i()->page ) and (intval( \IPS\Request::i()->page ) > 0)) ? \IPS\Request::i()->page : 1;}}
{{$start 	= ( $limit * ( $page - 1 ) );}}
{{$select = \IPS\Db::i()->select( 'cms_custom_database_8.field_68 as nome_do_suplemento, cms_custom_database_8.record_image_thumb as imagem, cms_custom_database_8.primary_id_field as id_do_suplementos, cms_custom_database_8.member_id as autor, cms_custom_database_8.record_updated as data_de_atualizacao, cms_custom_database_8.record_comments as numero_de_comentarios', 'cms_custom_database_8', array( 'field_140=?', $record->primary_id_field ), 'cms_custom_database_8.field_68 ASC', array( $start, $limit ), NULL, NULL, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS );}}
{{$total = count( $select );}}

Total should be 64, but it gives me 20, the number of rows used as query LIMIT.

Edited by sobrenome
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...