There are a handful of static queries remaining in Book module.
This patch converts them to dynamic queries.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AaronBauman’s picture

Status: Active » Needs review
AaronBauman’s picture

Title: Convert queries in Book module to use DBTNG » DBTNG: Book module

Status: Needs review » Needs work

The last submitted patch, book-dbtng.patch, failed testing.

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
587 bytes

Agreed, save one instance:
In book.install there's a static DELETE query.

From the docs in database.inc:

...
* INSERT, UPDATE, and DELETE queries need special care in order to behave
* consistently across all different databases. Therefore, they use a special
* object-oriented API for defining a query structurally.
...

Rerolled with only the DELETE query dbtng-ized.

AaronBauman’s picture

FileSize
598 bytes

actually calling execute() on the query would help...

Damien Tournoud’s picture

Status: Needs review » Needs work

This should be formatted as:

db_delete('table')
  ->condition('field', 'value')
  ->execute();

See similar queries elsewhere in core.

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
394 bytes

understood. updated patch attached.

Stevel’s picture

Status: Needs review » Reviewed & tested by the community

This looks good.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -DBTNG Conversion

Automatically closed -- issue fixed for 2 weeks with no activity.