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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:46:14+00:00 2026-05-16T14:46:14+00:00

I am using Zend_Db with the Pdo_Mysql driver. This query does not give any

  • 0

I am using Zend_Db with the Pdo_Mysql driver. This query does not give any results:

$s = $db->prepare('SELECT ET.id
                    FROM elementTypes AS ET, language AS L1 
                    WHERE L1.strId = ET.dispName AND L1.language = ?');
$s->execute(array(2));                                          
pr($s->fetchAll());

If I hardcode the parameter, the expected rows are returned.

What is going on here?

Edit: Here’s a stripped down script with even simpler queries: http://pastebin.com/84UtcGGZ

Eidt 2: I have drilled further down and found that the problem lies with PDO and comparing ENUMS with ints. See this question: PDO cannot compare mysql ENUM using integers in prepared statements
If you know any fixes/workarounds on how to get this to work on Zend_Db, please post! :)**

  • 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-16T14:46:15+00:00Added an answer on May 16, 2026 at 2:46 pm

    The reason why the statement does not work is that L1.language is an ENUM, and you cannot compare ENUMS with integers in Zend_Db / PDO.

    Why, and how to avoid this is explaied in this question: PDO cannot compare mysql ENUM using integers in prepared statements

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

Sidebar

Related Questions

I am trying to replicate this query using zend framework: SELECT activitytype.description, activity.datecompleted FROM
I'm using Zend_DB and trying to change the charset to utf8, here is the
Zend has Zend_Db but it's not a full ORM. I already have sections of
I'm having trouble finding my way around Zend Framework documentation. I'm currently using the
I know people complain usually about scripts not working, but here is a case
I am using Zend_Pagintor class with Zend_Db_Table_Abstract . Zend_Pagintor has a count() method but
I have to show the list of products added to a particular category on
Reading the section Zend_Application_Resource_Modules in the docs here: http://framework.zend.com/manual/1.10/en/zend.application.available-resources.html I noticed this: You can
Request: Please show me a working example of how to retrieve(in an array?) returned
I am having a little play with an ORM but I am struggling to

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.