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 8273041

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:20:23+00:00 2026-06-08T07:20:23+00:00

I am developing with symfony 1.4 and using Doctrine ORM. After building schema and

  • 0

I am developing with symfony 1.4 and using Doctrine ORM.
After building schema and models i’ve got some classes for work with database. I can also use Doctrine_query …. The only thing, that i cann`t understend is:

I need to update table.

Doctrine_Query::create()->update('table')->.....->execute().

or

$tbl = new Table();
$tbl->assignIdentifier($id);
if($tbl->load()){
    $tbl->setFieldname('value');
    $tbl->save();
}

how can i understend was it successful result of query or not ? and how much rows was updated.

p.s. the same question is for delete operation.

  • 0 0 Answers
  • 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-08T07:20:24+00:00Added an answer on June 8, 2026 at 7:20 am

    Everything is in the doc for update and delete.

    When executing DQL UPDATE and DELETE queries the executing of a query returns the number of affected rows.

    See examples:

    $q = Doctrine_Query::create()
            ->update('Account')
            ->set('amount', 'amount + 200')
            ->where('id > 200');
    
    $rows = $q->execute();
    
    echo $rows;
    
    $q = Doctrine_Query::create()
            ->delete('Account a')
            ->where('a.id > 3');
    
    $rows = $q->execute();
    
    echo $rows;
    

    This is related to DQL (when you are using doctrine queries). But I think ->save() will return the current object or true/false as @PLB commented.

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

Sidebar

Related Questions

I am developing in symfony 1.4 using Doctrine ORM. I can't create a NOT
I am developing an application using Symfony2 and DQL for building some queries in
Following this tutorial i'm developing a web application using symfony authentication/authorization architecture. After designing
I am developing an application using Symfony 1.4. Is it posible to disable a
Currently developing an application using the newest version of symfony, obtained through PEAR. This
I am developing a new application using Symfony. I want to store the passwords
What's the best way to make small schema updates to your symfony/doctrine application? My
I'm using Aptana as my IDE while developing a Symfony (1.4) site. I have
I am developing an application using symfony2 and using orm.yml files for mapping the
I am developing an application using Symfony 2 and Twig for templating. I would

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.