Menu

[2eb2a2]: / dbsync_list_branches.php  Maximize  Restore  History

Download this file

31 lines (27 with data), 917 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include_once('utils/compatibility.inc.php');
setCompatibility(0);
include("utils/utils.inc.php");
include("utils/constants.inc.php");
include("conf/config.inc.php");
mysql_connect($dbserver, $username, $password);
@mysql_select_db($database) or die("Unable to select database");
echo "projectid;istag;visible;versionnr;branchname;\n";
//create HEAD line
echo "-1;0;1;0;HEAD;\n";
$query="SELECT * from tbbranch ORDER BY name ASC";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$i=0;
while ($i<$num) {
$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$projectid=mysql_result($result,$i,"project_id");
$istag=mysql_result($result,$i,"istag");
$isvisible=mysql_result($result,$i,"visible");
$versionnr=mysql_result($result,$i,"versionnr");
if ($name!="HEAD") echo "$projectid;$istag;$isvisible;$versionnr;$name;\n";
$i++;
}
mysql_close();
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.