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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:41:28+00:00 2026-06-03T19:41:28+00:00

So I got a wierd bug (or maybe I’m just stupid), when I runs

  • 0

So I got a wierd bug (or maybe I’m just stupid), when I runs an active record query. Take a look at this:

$results = $this->db->
  select('cd.casino_name, cd.casino_opened, cd.casino_latitude, cd.casino_longitude')->
  from('casino_data as cd, casino_cities as cc')->
  where('cd.city_id',$city_id)->
  where('cd.city_id=cc.city_id')->
  get()->result_array();

Then I got that:

Error Number: 1054

Unknown column 'cd.city_id=cc.city_id' in 'where clause'

SELECT `cd`.`casino_name`, `cd`.`casino_opened`, `cd`.`casino_latitude`, `cd`.`casino_longitude`
FROM (`m_casino_data` as cd, `m_casino_cities` as cc)
WHERE `cd`.`city_id` =  1
AND `cd`.`city_id=cc`.`city_id`

Filename: httpdocs/_dev/libraries/Test.php

Line Number: 649

Sh*t happened… Or in v2.0 CI has been changed something in the DB class?

help plz…thx

  • 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-03T19:41:29+00:00Added an answer on June 3, 2026 at 7:41 pm

    The problem is there with the where clause

    $results = $this->db->
    select('cd.casino_name, cd.casino_opened, cd.casino_latitude, cd.casino_longitude')->
    from('casino_data as cd, casino_cities as cc')->
    where('cd.city_id',$city_id)->
    where('cd.city_id','cc.city_id')->//this would produce WHERE cd.city_id = cc.city_id
    get()->result_array();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this weird bug happening. I'm basically just adding a few minutes to
Well Im stucked at this point.please take a look at this http://jsfiddle.net/karthik64/5jhgF/3/ Okay first
Got a weird bug best shown by this page http://www.zoecormier.com/freelance/ Scroll down to the
I've got a wierd/annoying little bug which I don't even know how to properly
I have got this super weird bug in my current project. To understand what
I hope someone can help me with this weird bug. I've got a popover
I've got a weird bug occurring in a compact database on a Vista deployment
I got this weird error when I wanted to validate my in-memory xml Schema,
I got a weird bug. In my .css file I have the following rule:
I've got a really wierd problem on my hands... When I try to require

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.