From: Nicolas Boisselier Date: Tue, 16 Aug 2016 15:30:02 +0000 (+0100) Subject: Merge branch 'master' of git.nbdom.net:nb X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=51e14f6e573cd958d02a61231e85152c67e994f3;p=nb.git Merge branch 'master' of git.nbdom.net:nb --- 51e14f6e573cd958d02a61231e85152c67e994f3 diff --cc lib/php/db.php index 16143b9b,7fc989ea..56c0c0b8 --- a/lib/php/db.php +++ b/lib/php/db.php @@@ -911,14 -861,20 +911,20 @@@ return 'h' => 'header', )); - #if($format = out::client_type()) Db::pset('format',$format); + #if($format = out::client_type()) self::pset('format',$format); # Param - Extract dbname from table - if (preg_match('/^(\w+)\.(.*?)$/',Db::p('table'),$m)) { - Db::pset('db',$m[1]); - Db::pset('table',$m[2]); + if (preg_match('/^(\w+)\.(.*?)$/',self::p('table'),$m)) { + self::pset('db',$m[1]); + self::pset('table',$m[2]); } + # Select param + if (Db::p('table') and Db::p('select')) { + Db::pset('table','SELECT '.(Db::p('select')).' FROM '.Db::p('table')); + Db::pset('select',''); + } + } } # < Class