function DB_mysql::getSpecialQuery in Flickr API 5
Obtains the query string needed for listing a given type of objects
@access protected
Parameters
string $type the kind of objects you want to retrieve:
Return value
string the SQL query string or null if the driver doesn't support the object type requested
Overrides DB_common::getSpecialQuery
See also
File
- phpFlickr/
PEAR/ DB/ mysql.php, line 1008
Class
- DB_mysql
- The methods PEAR DB uses to interact with PHP's mysql extension for interacting with MySQL databases
Code
function getSpecialQuery($type) {
switch ($type) {
case 'tables':
return 'SHOW TABLES';
case 'users':
return 'SELECT DISTINCT User FROM mysql.user';
case 'databases':
return 'SHOW DATABASES';
default:
return null;
}
}