db_update Query Issue
Drupal 7 doesn't use %placeholder style query placeholders. Furthermore, there's an error passing a list of strings to db_query instead of an array.

Your query would be

db_query('UPDATE {users} SET name = :name, mail = :mail WHERE uid = :uid',
           array(':name' =&gt; $name, ':mail' =&gt; $mail, ':uid' =&gt; $account-&gt;uid));


However, you should probably use db_update for update queries, in which case it would indeed be:

db_update('users')
-&gt;fields(array(
    'name' =&gt; $name,
    'mail' =&gt; $mail
))
-&gt;condition('uid', $account-&gt;uid)       
-&gt;execute();


You error is occurring because the initial db_query accepts an array of parameters in D7.

More info: 
https://api.drupal.org/api/drupal/includes%21database%21database.inc/group/database/7