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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:10:14+00:00 2026-05-13T21:10:14+00:00

So, I’m trying to use Doctrine to retrieve some data. I have some basic

  • 0

So, I’m trying to use Doctrine to retrieve some data. I have some basic code like this:

$conn = Doctrine_Manager::connection(CONNECTION_STRING);
$site = Doctrine_Core::getTable('Site')->find('00024');
echo $site->SiteName;

However, this keeps throwing a SQL error that ‘column siteid does not exist’. When I look at the exception the SQL query is this (you can see the error is that the inner_tbl alias for siteid is set to s__siteid, so querying inner_tabl.siteid is what’s broken):

SELECT TOP 1 
    [inner_tbl].[siteid] AS [s__siteid]
FROM 
    (SELECT TOP 1 
        [s].[siteid] AS [s__siteid],
        [s].[name] AS [s__name], 
        [s].[address] AS [s__address], 
        [s].[city] AS [s__city], 
        [s].[zip] AS [s__zip], 
        [s].[state] AS [s__state], 
        [s].[region] AS [s__region], 
        [s].[callprocessor] AS [s__callprocessor], 
        [s].[active] AS [s__active], [s].[dateadded] AS [s__dateadded] 
    FROM [Sites] [s] 
    WHERE ([s].[siteid] = '00024')
    ) AS [inner_tbl] 

Why is the query being generated this way? Could it be the way the Yaml schema is laid out?

Site:
  connection: 0
  tableName: Sites
  columns:
    siteid:
      type: string(5)
      fixed: true
      unsigned: false
      primary: true
      autoincrement: false
    name:
      type: string(300)
      fixed: false
      unsigned: false
      notnull: true
      primary: false
      autoincrement: false
    address:
      type: string(100)
      fixed: false
      unsigned: false
      notnull: false
      primary: false
      autoincrement: false
    city:
      type: string(100)
      fixed: false
      unsigned: false
      notnull: false
      primary: false
      autoincrement: false
    zip:
      type: string(5)
      fixed: false
      unsigned: false
      notnull: false
      primary: false
      autoincrement: false
    state:
      type: string(2)
      fixed: true
      unsigned: false
      notnull: true
      primary: false
      autoincrement: false
    region:
      type: integer(4)
      fixed: false
      unsigned: false
      notnull: true
      default: (5)
      primary: false
      autoincrement: false
    callprocessor:
      type: integer(4)
      fixed: false
      unsigned: false
      notnull: true
      primary: false
      autoincrement: false
    active:
      type: integer(1)
      fixed: false
      unsigned: false
      notnull: true
      primary: false
      autoincrement: false
    dateadded:
      type: timestamp(16)
      fixed: false
      unsigned: false
      notnull: true
      default: (getdate())
      primary: false
      autoincrement: false
  • 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-05-13T21:10:15+00:00Added an answer on May 13, 2026 at 9:10 pm

    I spoke to one of the developers (Johnathan Wage) in the IRC room and he says that SQL may work, but that there are probably bugs (I’m assuming this is one). He also said that Doctrine was written specifically with MySQL in mind.

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

Sidebar

Ask A Question

Stats

  • Questions 390k
  • Answers 390k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm not that much into Ruby (although I've played a… May 15, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer You can use ToString together with a formatting string and… May 15, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer You can use Hashie's Mash . One of the best… May 15, 2026 at 1:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.