Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is my first time working with the DBTNG and I like it. This is the patch to get contact to DBTNG. I ran the tests and they were working fine.
While working on this patch we talked about what should be the prefered method to fetch a single record (so not just one column) from the database. Angie and Larry decided to go for:
$contact = db_query("SELECT * FROM {contact} WHERE cid = :cid", array(':cid' => $cid))->fetchAssoc();
Comment | File | Size | Author |
---|---|---|---|
#14 | 302219-4.patch | 665 bytes | pp |
#10 | 302219_contact.3.patch | 8.53 KB | cyberswat |
#8 | 302219_contact.2.patch | 8.96 KB | cyberswat |
#6 | 302219_contact.1.patch | 8.47 KB | cyberswat |
contact_db_nextgen.patch | 3.46 KB | R.Muilwijk | |
Comments
Comment #1
R.Muilwijk CreditAttribution: R.Muilwijk commentedHmmz... sorry not yet 100%
Forgot to port the .test file :P
Comment #2
Crell CreditAttribution: Crell commentedSomeone needs to pick this this up.
Comment #3
Dave ReidComment #4
Crell CreditAttribution: Crell commentedComment #5
cyberswat CreditAttribution: cyberswat commentedComment #6
cyberswat CreditAttribution: cyberswat commentedComment #8
cyberswat CreditAttribution: cyberswat commentedComment #9
Crell CreditAttribution: Crell commentedThere's no need to make select queries dynamic unless we actually need dynamic behavior. Converting queries we don't need to just slows them down. Example:
The static form would be better.
That should be broken up to 3 lines:
That should be converted to db_delete().
Comment #10
cyberswat CreditAttribution: cyberswat commentedComment #11
Crell CreditAttribution: Crell commentedSweet. Thanks!
Comment #12
webchickCommitted! Yay!! :D
Comment #14
pp CreditAttribution: pp commentedContact admin page is not working! (admin/build/contact)
We collect the data in the $row array but we give the temlplate the name: $rows.
Here is a patch, please apply.
Sorry, I don't know what shall I do. I create a new issue (#413060: Contact list is empty.) and modify existing
Comment #15
mr.baileysHi pp,
Thanks for writing the patch. However, it's generally not a good idea to reopen issues once they've been marked fixed or closed, especially since looking at your patch I think this is a different issue altogether.
Opening a new issue (as you did) is the way to go, so marking this one closed again.
Comment #16
pp CreditAttribution: pp commentedOk, next time I will create a new patch. Thanks!
pp