SELECT COUNT(uid) FROM users WHERE name = $username
Drupal db_select version:
$q = db_select('users', 'u'); $q->fields('u', array('uid')); $q->condition('u.name', $username); $row_count = $q->countQuery()->execute()->fetchField();
Random thoughts on Linux, Java, security and other technical stuff...
SELECT COUNT(uid) FROM users WHERE name = $username
$q = db_select('users', 'u'); $q->fields('u', array('uid')); $q->condition('u.name', $username); $row_count = $q->countQuery()->execute()->fetchField();
No comments:
Post a Comment