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

  • Home
  • SEARCH
  • 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 9114473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:12:30+00:00 2026-06-17T04:12:30+00:00

Currently I am writing a website using Kohana framework 3.3. Today, I wanted to

  • 0

Currently I am writing a website using Kohana framework 3.3. Today, I wanted to create subpage where user would be able to browse news, however I encountered a small problem with Kohana ORM.

I would like to retrieve only a dozen / several dozen characters from a text field, because loading the entire field would be a significant waste of server resources.

Does anyone know how I can achieve the same effect as in those cases?

  • ↓ MySQL/SQL retrieve first 40 characters of a text field?
  • (preffered) http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_left
  • How to select only some characters from MySQL field?

Thanks in advance for your answers.

  • 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-17T04:12:31+00:00Added an answer on June 17, 2026 at 4:12 am

    This isn’t possible with the ORM class. You can build your own query with Kohana’s own query builder and the object can be returned as an ORM-model, therefore you fill in your ORM model name (e.g. ‘my_orm_model’) in the as_object function.

    Combining one of your suggested links with Kohana’s own Query builder you would get something like this.

    DB::Query(Database::SELECT,"SELECT LEFT(field, 40) AS excerpt FROM table(s) WHERE ...")->as_object('my_orm_class')->execute();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a function what would create a zip file, which will be
So I'm writing a test framework for a large website, and am currently working
I am writing a website using Python / Django, and am currently doing server-side
I'm currently writing a website with a friend and I need to create a
I'm currently writing a website in ASP.NET MVC, and my database (which doesn't have
I'm currently writing the documentation for the API of my website. I'm not sure
I am currently writing a program using Weka that builds a model (using one
I'm currently writing a billing application using EF 5 Code First, and I'm running
I'm currently writing a Powershell script that's used to select a user from Active
I'm writing up custom code for a CMS for a website. When a user

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.