This should be nice and easy. There's only 3 queries, all in the install file.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | php.module-1.patch | 1.7 KB | csevb10 |
| #5 | php.module-1.patch | 1.7 KB | csevb10 |
| #4 | php.module-1.patch | 1.69 KB | csevb10 |
| #1 | php.module-1.patch | 1.81 KB | csevb10 |
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.