File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
- ===
2
- Whube base code, copyright Whube team, 2010, AGPLv3
3
- ===
4
1
GNU AFFERO GENERAL PUBLIC LICENSE
5
2
Version 3, 19 November 2007
6
3
Original file line number Diff line number Diff line change 21
21
class bug extends dbobj {
22
22
function bug () {
23
23
dbobj::dbobj ("bugs " , "bID " ); // SQL table `bugs', PK `bID'
24
+ // this just calls the super-class's constructor
25
+ // this tells the dbobj sutff to use the the
26
+ // `bugs' table, with a primary key of `bID'.
24
27
}
25
28
// Let's add in some functionallity for user stuff.
26
29
function getOwner ( $ bID ) {
27
- $ this ->getAllByPK ( $ bID );
30
+ $ this ->getAllByPK ( $ bID ); // get everything
31
+ // that matches the PK
32
+ // being = to $bID
28
33
$ row = $ this ->getNext ();
34
+ // get the next (and hopefully
35
+ // only ) row
29
36
$ u = new user ();
30
37
$ u ->getAllByPK ( $ row ['owner ' ] );
31
38
return $ u ->getNext (); // ( first row :P )
@@ -48,7 +55,7 @@ function getProject( $pID ) {
48
55
function getAllBugs () {
49
56
global $ TABLE_PREFIX ;
50
57
$ sql = new sql ();
51
- $ sql ->query ("SELECT * FROM " . $ TABLE_PREFIX . "bugs; " );
58
+ $ sql ->query ("SELECT * FROM " . $ TABLE_PREFIX . "bugs ORDER BY bID DESC ; " );
52
59
$ ret = array ();
53
60
while ( $ row = $ sql ->getNextRow () ) {
54
61
array_push ( $ ret , $ row );
You can’t perform that action at this time.
0 commit comments