SQL fix to have entries display when switching to timetrack enabled and no company_id is set

This commit is contained in:
Miles Lott 2001-01-21 20:34:50 +00:00
parent b6dcca5618
commit 9d77bffd4c
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@
if ($phpgw_info["apps"]["timetrack"]["enabled"]) { if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname," $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,"
. "a.ab_email,a.ab_wphone,c.company_name " . "a.ab_email,a.ab_wphone,c.company_name "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id " . "from addressbook as a, customers as c where a.ab_company_id = c.company_id OR a.ab_company_id = '' OR a.ab_company_id = '0' "
. "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); . "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);
} else { } else {
$phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); $phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);

View File

@ -321,7 +321,7 @@
if ($phpgw_info["apps"]["timetrack"]["enabled"]) { if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname," $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,"
. "a.ab_email,a.ab_wphone,c.company_name " . "a.ab_email,a.ab_wphone,c.company_name "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id " . "from addressbook as a, customers as c where a.ab_company_id = c.company_id OR a.ab_company_id = '' OR a.ab_company_id = '0' "
. "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); . "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);
} else { } else {
$phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); $phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);