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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:09:22+00:00 2026-06-14T08:09:22+00:00

In my PHP script I run an update statement as follows: $this->_db->update(‘names’, $data, $this->_db->quoteInto(‘id

  • 0

In my PHP script I run an update statement as follows:

$this->_db->update('names', $data, $this->_db->quoteInto('id = ?', $obj->id));

The db handle is a Zend_Db_Adapter_Abstract instance (of the PDO MySql variety).

The problem is that the update is failing and I can’t seem to get more info on the error.

The error occurs within a try/catch block. When I catch the error, I run:

$db->getProfiler()->getLastQueryProfile();

And the output is:

2012-11-14T22:20:02+11:00 INFO (6): Zend_Db_Profiler_Query Object
(
    [_query:protected] => begin
    [_queryType:protected] => 64
    [_startedMicrotime:protected] => 1352892002.6064
    [_endedMicrotime:protected] => 1352892002.6066
    [_boundParams:protected] => Array
        (
        )

I know it says no parameters are bound, but I really don’t think that’s the case. I think that somehow ‘last query’ is not what I think it is.

Secondly, when I catch the error I also run:

$db->getConnection()->errorInfo();

And the output is:

2012-11-14T22:20:02+11:00 INFO (6): Array
(
    [0] => 00000
    [1] => 
    [2] => 
)

Obviously this is not very helpful.

Any ideas? How can I get more info on the error?

Thanks!

  • 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-14T08:09:23+00:00Added an answer on June 14, 2026 at 8:09 am

    You can force PDO to throw exceptions with all the info:

    <?php
    
    $this->_db->->getConnection()->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    
    try {
        $this->_db->update('names', $data, $this->_db->quoteInto('id = ?', $obj->id));
    }
    catch (Exception $ex) {
        print_r($ex);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run sudo svn --username radek update .$codebase. --force; from my php script (on
I would like run a PHP script that runs every second to update a
I have a basic PHP script like this: <?php system(/bin/touch /root/testfile); When I run
I have a PHP script to run. If I run it from the command
i wanna using curl in php script and run it in command line mode.
I used a loop in my php script to run insert queries into my
I have a php script that is run once a minute. The script runs
I run a php script on a page which looks for certain classes/elements and
I want to run a php script from the command line that is always
I have a php script I need to run every 5 seconds (run, wait

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.