svn: /web/php-rmtools/trunk/include/ Base.php

From: Date: Mon, 18 Jan 2010 20:17:43 +0000
Subject: svn: /web/php-rmtools/trunk/include/ Base.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-7078@lists.php.net to get a copy of this message
pajoye Mon, 18 Jan 2010 20:17:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=293710 Log: - add getall Changed paths: U web/php-rmtools/trunk/include/Base.php Modified: web/php-rmtools/trunk/include/Base.php =================================================================== --- web/php-rmtools/trunk/include/Base.php 2010-01-18 20:16:45 UTC (rev 293709) +++ web/php-rmtools/trunk/include/Base.php 2010-01-18 20:17:43 UTC (rev 293710) @@ -157,4 +157,24 @@ return $releases; } + + function getAllReleases() { + $sql = 'SELECT name FROM release ORDER BY name'; + $res = sqlite_query($this->db, $sql); + if (!$res) { + Throw new \Exception('Query failed for ' . $release); + } + + if (sqlite_num_rows($res) == 0) { + Throw new \Exception($rm . ' not found.'); + } + $rel = sqlite_fetch_all($res, SQLITE_NUM); + print_r($rel); + $releases = array(); + foreach ($rel as $v) { + $releases[] = $v[0]; + } + + return $releases; + } }

« previous php.webmaster (#7078) next »