CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What version of packages/DB/DataObject.php is currently in use with 3.1.4?
Pages: [1]

Author Topic: What version of packages/DB/DataObject.php is currently in use with 3.1.4?  (Read 1110 times)

jsherk

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 0
What version of packages/DB/DataObject.php is currently in use with 3.1.4?
April 28, 2010, 01:55:56 pm
Does anybody know what version of packages/DB/DataObject.php is currently in use with 3.1.4?

The file itself does not seem to specify that I can see.

Thanks

EDIT: The reason I am asking is because I am wondering why ::executeQuery('INSERT bla bla') does not return the insert id. Also UPDATE does return ids either. Perhaps civicrm is using an old version that does not have this feature yet? Or perhaps I am just missing how to do because I am expecting the id to be returned in the result set from the query because SELECT works fine and returns all the ids!
« Last Edit: April 28, 2010, 02:09:11 pm by jsherk »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What version of packages/DB/DataObject.php is currently in use with 3.1.4?
April 28, 2010, 05:11:36 pm

check: http://svn.civicrm.org/civicrm/branches/v3.2/packages/VERSIONS

note that executeQuery is implemented in CRM/Core/DAO.php and not DB_DataObject

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jsherk

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 0
Re: What version of packages/DB/DataObject.php is currently in use with 3.1.4?
April 28, 2010, 06:29:14 pm
Yes, but I believe it calls functions from dataobject, so thats why I was looking thru it and just trying to figure out what its doing and how it is doing it!

Is there a way to call mysql_insert_id after the query to retrieve the id?

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What version of packages/DB/DataObject.php is currently in use with 3.1.4?
April 28, 2010, 09:51:06 pm

we return the DAO returned by DB/DataObject.php.so u might want to check those contents

i also suspect that you can run mysql_insert_id after the query and get the latest id (assuming nothing else happened between that)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jsherk

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 0
Re: What version of packages/DB/DataObject.php is currently in use with 3.1.4?
April 28, 2010, 09:59:24 pm
The DAO does not appear to contain the INSERT ID that I can see.

I will try the mysql_insert_id ... that should probably work!

Thanks

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What version of packages/DB/DataObject.php is currently in use with 3.1.4?

This forum was archived on 2017-11-26.