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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:12:50+00:00 2026-06-13T15:12:50+00:00

I just recently started using active record (before I just wrote manual queries since

  • 0

I just recently started using active record (before I just wrote manual queries since I was so used to them).

I was looking at the code of ion_auth and I saw that in a few places the strings had been escaped even though active record was used,

i.e

 ->where($this->identity_column, $this->db->escape_str($identity))
 ->where($this->tables['groups'].'.name', $this->db->escape_str($group))

Thing is, I havent escaped anywhere where I have used active record since on the documentation it said active record escapes strings automatically.

My question, when using active record, are there some situations when you should escape strings?

  • 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-13T15:12:51+00:00Added an answer on June 13, 2026 at 3:12 pm

    From the Codeigniter User Guide:

    Beyond simplicity, a major benefit to using the Active Record features
    is that it allows you to create database independent applications,
    since the query syntax is generated by each database adapter. It also
    allows for safer queries, since the values are escaped automatically
    by the system.

    The creator of ion_auth may have had a particular reason for escaping the string, but if you are using Active Record, Codeigniter escapes the queries automatically.

    But there are queries that “look” like they might be Active Record, which need to be escaped. Here’s a list of them, again from the Codeigniter User Guide.

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

Sidebar

Related Questions

I just recently started with object oriented programming, using java. Before I was programming
I have just recently started using ReSharper and am looking for a way of
I have just recently started using NetBeans IDE (6.9.1) and have used it to
I've just recently started using libsvm. I've been trying for awhile to train my
I've just recently started using Github to host my blog (using Jekyll and Liquid).
I've just recently started to build a web site using ASP.NET - MVC 4,
I just recently started using this library (the one from CodePlex), but I ran
I've just recently started using SQLAlchemy and am still having trouble wrapping my head
I just recently started using Jinja2 for HTML templating on Google App Engine and
I just recently started using Mono for Android and I am trying to consume

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.