count

Count rows in a large file

  1. /**
  2.  * Helper function to get the number of rows in a file. Excludes the first row
  3.  * which contains the column names.
  4.  *
  5.  * @param string $file

Number of nodes of specific type created since last login

  1. SELECT COUNT(1) FROM {nodes} n
  2. WHERE n.created > (SELECT login FROM {users} u WHERE uid = %d)
  3. AND n.type = '%s'
Syndicate content