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 8461381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:51:52+00:00 2026-06-10T13:51:52+00:00

coders. I’m running a little problem here and can’t find the solution. I’m building

  • 0

coders. I’m running a little problem here and can’t find the solution. I’m building a query using Active Record from CI. This is the code for the query:

 $this->db->select("u.id AS user_id, u.email, p.display_name, p.first_name, p.last_name, s.status_id, s.message");
    $this->db->select("DATE_FORMAT(s.created_at, `Publicado el %d/%m/%Y a las %h:%i %p`) AS created_at", FALSE);

 $this->db->join($this->_table_users . ' u', 'u.id = s.user_id');
 $this->db->join($this->_table_profiles . ' p', 'p.user_id = u.id');

 $this->db->where_in('user_id', $str);
 $this->db->where('deleted', 0);

 $this->db->from($this->_table . ' s');

 $this->db->order_by('s.created_at', 'desc');

But I’m getting this error:

Error Number: 1054

Unknown column ‘Publicado el %d/%m/%Y a las %h:%i %p’ in ‘field list’

SELECT u.id AS user_id, u.email, p.display_name, p.first_name,
p.last_name, s.status_id, s.message, DATE_FORMAT(s.created_at, Publicado el > %d/%m/%Y a las %h:%i %p) AS created_at FROM (default_status s, default_status) JOIN > default_users u ON u.id = default_s.user_id JOIN default_profiles p ON
p.user_id = u.id WHERE user_id IN (‘5726, 2, 10293’) AND deleted = 0 ORDER
BY s.created_at desc LIMIT 2

Does any know where I can use DATE_FORMAT within this query? The funny is the same query write as pure SQL works
Cheers and thanks in advance

  • 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-10T13:51:54+00:00Added an answer on June 10, 2026 at 1:51 pm

    Add FALSE as the second parameter in your SELECT statement. You may have to do something similar in your WHERE clause as well.

    Some links to look over:

    http://ellislab.com/forums/viewthread/74206/#368778

    http://ellislab.com/forums/viewthread/206962/#963061

    http://ellislab.com/codeigniter/user-guide/helpers/date_helper.html

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

Sidebar

Related Questions

This seems to be a common problem among coders from different languages. I'm using
I'm having a problem with my coders, they seems to keep on overwriting each
I need a bit of help from any of the coders out there..... Currently,
I'm building a simple 2d game,and I'm wondering if some better coders than I
Hello , all my fellow coders! I've got a problem ohh chok! .. :P
Theres a war brewing I can feel it! Old school coders are used to
This question is being asked here, since coders know ruby darkness. (FreeBSD) I ran
Possible Duplicate: Find url from string with php I found this code: but 2
We all coders here, basically. What I'm going to ask you, is how you're
I wanted to get a general idea from other RoR coders out there as

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.