From: <tr...@us...> - 2002-09-08 23:12:42
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv1630 Modified Files: protocol.inc.php Log Message: Fixed join order to work with postgresql (LEFT JOIN) Index: protocol.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/protocol.inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** protocol.inc.php 8 Sep 2002 22:38:08 -0000 1.8 --- protocol.inc.php 8 Sep 2002 23:12:40 -0000 1.9 *************** *** 178,182 **** // Returns an array with lots of fields (id,etype,name,descr,submitter, ! // fileid,fname,fileSize,date,sname). function getBrief($type = 0) { --- 178,182 ---- // Returns an array with lots of fields (id,etype,name,descr,submitter, ! // fileId,fname,fileSize,date,sname). function getBrief($type = 0) { *************** *** 184,189 **** $query = "SELECT p.*, u.name AS fname, u.`fileSize`, ". "u.`addedDate` AS fdate, s.`userName` AS sname ". ! "FROM Protocol p, Submitter s ". ! "LEFT JOIN Upload u ON u.id = p.fileid ". "WHERE s.id = p.submitter "; if($type) $query .= "AND p.etype = $type ORDER BY p.id"; --- 184,189 ---- $query = "SELECT p.*, u.name AS fname, u.`fileSize`, ". "u.`addedDate` AS fdate, s.`userName` AS sname ". ! "FROM Submitter s, Protocol p ". ! "LEFT JOIN Upload u ON u.id = p.`fileId` ". "WHERE s.id = p.submitter "; if($type) $query .= "AND p.etype = $type ORDER BY p.id"; |