Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
UPDATE {node} SET comment = 1 WHERE comment = 2 AND uid = %d AND type = '%s'
If there are no nodes of the given type by the specified user, db_affected_rows() returns 1. Doing the same query in PhpMyAdmin shows 0 rows.
Comments
Comment #1
dpearcefl CreditAttribution: dpearcefl commentedWhat database are you using?
Comment #2
NancyDruMySql
Comment #3
dpearcefl CreditAttribution: dpearcefl commentedHere is my test code for your problem:
Which returns
Rows [0]
Can you provide your code?