phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] db (was class.acl + mysql)


From: Sigurd Nes
Subject: Re: [Phpgroupware-developers] db (was class.acl + mysql)
Date: Sat, 15 Apr 2006 14:16:24 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

I have added 'join' and 'like' variables to class.db.inc.php and fixed the 'join' in class.acl.inc.php

Regards

Sigurd

Dave Hall wrote:
Hi all,

The like is fine.
Just make it a public property of the db class:

'SELECT field FROM tbl '
        . " WHERE other_field {$db->like} .'%" $db->db_addslashes($val) . "%'";

I think we can make mysql 4 the minimum requirement for HEAD or else we
will always be being held back by old versions.  The current version of
mysql is 5.0.20 with 5.1 in beta.

Also for many left joins, I think the syntax is messy and not as clear
to read as just using a simple WHERE tbl1.tbl_id = tbl2.tbl1_id  Maybe
that is just me.

While we are on the topic of the db.  All apps tables should be prefixed
with phpgw_ to avoid conflicts for people using shared hosting with a
single db.  I know property has been exempted from this, but ged and hrm
should comply with the requirement imho.

Cheers

Dave


On Fri, 2006-04-14 at 23:10 +0200, Sigurd Nes wrote:
How about putting something like this (from 'property') some central
place in the api?

if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
{
   $this->join = "JOIN";
   $this->like = "ILIKE";
}
else
{
   $this->join = "INNER JOIN";
   $this->like = "LIKE";
}

Regards

Sigurd


aeb wrote:
On Thu, 13 Apr 2006, Chris Weiss wrote:

mysql is picky, that should be LEFT JOIN or INNER JOIN or even LEFT
INNER JOIN, for some reason mysql doens't assume LEFT INNER like other
rdbms do
yes, it works with left join in mysql, but not in psql. i got that prob in
projects years ago and ended up switching the sql statement for
mysql -> left join /postgres -> join

On 4/13/06, aeb <address@hidden> wrote:
hey,

phpgw head - acl:
the join statement (attached file) doesn't work with mysql 3.23.55.
whats the smallest mysql version phpgw supports?




_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]