0

In a D7 site, I'd like to get all of the user signatures using raw mysql query . I've found a signature_forum_post table but could not figure out how to make a query that returns both user.id and signature text, so appreciate your help.

0

Please try the following.

if ($account->id() && isset($form_state['values']['user_signature'])) { if (!$account->get('user_signature')->isEmpty()) { db_merge('user_signature') ->key(array('uid' => $account->id())) ->fields(array( 'signature__value' => $account->get('user_signature')->value, 'signature__format' => $account->get('user_signature')->format, )) ->execute(); } else { db_delete('user_signature') ->condition('uid', $account->id()) ->execute(); } }

  • Please note that I wanted sql query not php. – Jand Nov 16 '15 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.