Created
March 12, 2014 07:53
-
-
Save filbertkm/9502604 to your computer and use it in GitHub Desktop.
subquery in mediawiki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$select = $this->dbw->selectSQLText( | |
'user_properties', | |
array( 'up_user', 'up_property', 'up_value', 'count(up_user) as count' ), | |
'up_property=' . $this->dbw->addQuotes( $oldOption ) . ' OR up_property = ' . $this->dbw->addQuotes( $newOption ), | |
__METHOD__, | |
array( 'GROUP BY' => 'up_user' ) | |
); | |
$result = $this->dbw->select( | |
"( $select ) as user_props", | |
array( 'up_user' ), | |
array( 'count' => 1 ), | |
__METHOD__ | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment