Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8481433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:33:27+00:00 2026-06-10T19:33:27+00:00

In my query using Symfony 1.4/Propel 1.4, for pagination purpose, I need to set

  • 0

In my query using Symfony 1.4/Propel 1.4, for pagination purpose, I need to set limit like

Page1: LIMIT 0,6
Page2: LIMIT 6,6
Page3: LIMIT 12,6
.... & so on

I try

$c->setLimit(6);

Which is generating

LIMIT 6

I didn’t find setLimit methods with two parameters or similar function to set starting limit too. This is very common operation & I’m sure must be available in Propel but I’m unable to figure it out till now.

Can someone please suggest how set required limit (LIMIT 0,6)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:33:28+00:00Added an answer on June 10, 2026 at 7:33 pm

    You should use limit() and offset(), described here.

    For

    LIMIT 12,6
    

    use (if you are using the 1.6 ModelCriteria)

    $c->limit(6);
    $c->offset(12);
    

    and if you use old criteria:

    $c->setLimit(12);
    $c->setOffset(12);
    

    By the way, why do you build your own pager? Symfony profive a sfPager (generic) and also a sfPropelPager which handle that pretty well (even if you use a custom criteria, you can defined it using setCriteria()).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to execute following query (Using Propel 1.4/Symfony 1.4) update notification set read=1
I'm using symfony 1.3 with Propel 1.4. I need to use a prepared query
I am using Symfony 1.4 and Propel(ORM), i want to execute SQL query (
we using symfony 1.0. We have an module work with Propel objects. The sql-querys
I would like to write a hql query using a dynamic instantiation with a
I am using Symfony 2.0.10 with Doctrine 2.1 and have rather simple query (see
I would like to query using hibernate given a particulay query string I did
Hi am I am using Symfony to develop the Jobeet website while I try
I'm using Symfony 2 with doctrine. I've set up a custom repository with a
i'm trying to do a complex query with Criteria in a Symfony project using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.