Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
php.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Mar 2009 at 20:09 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
csevb10 commentedReplaced the queries as appropriate in php.install. This is a pretty small patch, but I think it covers all the necessary pieces.
Comment #2
csevb10 commentedI have got to learn to change the status when I post the patch...
Comment #3
Crell commentedWhen only inserting a single record into a table, it's better to just use ->fields() with an associative array. That way you never have to repeat yourself at all. Generally you only need to separate fields() and values() when doing a multi-insert.
Comment #4
csevb10 commentedFair enough. New patch with those issues resolved.
Comment #5
csevb10 commentedSmall formatting change.
Comment #6
csevb10 commentedAnother small formatting change. Makes me wish I could delete and/or revise posts. Though, hopefully each pass is closer to 100% correct.
Comment #7
chx commentedThanks for the work. What happened to - $format = db_result(db_query("SELECT MAX(format) FROM {filter_format}"));
though? Is format autoincrement?
Comment #8
csevb10 commentedIt's replaced by the call to db_insert since db_insert returns the same value that that query was looking for. I don't really think that MAX(format) was a particularly good way to get the last insert id, but this replaces that with core code in the database layer (example from mysql/query.inc):
Comment #9
chx commentedyes but that only works for serial fields but I looked it up and format is indeed a serial in filter_format table.
Comment #10
dries commentedCommitted to CVS HEAD. Thanks.