sql query

Mathieu Arnold arn_mat@club-internet.fr
Thu, 07 Mar 2002 01:07:21 +0100


---------------------- multipart/parallel attachment
Hi

I've been mucking out with the whole horde framework tonight, and, hum the
sql queries are quite really mysql compliant, but not sql compliant.

I don't know how you could get around that because my patch makes it
pgsql/sybase/oracle compliant, but no more mysql compliant :)

maybe you could just not use concatenation and do it afterwards in php...

-- 
Mathieu Arnold
---------------------- multipart/parallel attachment
Index: lib/Driver/sql.php
===================================================================
RCS file: /home/cvs/cvs/dup/horde/whups/lib/Driver/sql.php,v
retrieving revision 1.33
diff -u -r1.33 sql.php
--- lib/Driver/sql.php  6 Mar 2002 04:57:57 -0000       1.33
+++ lib/Driver/sql.php  6 Mar 2002 23:56:50 -0000
@@ -425,7 +425,7 @@
                 'whups_modules.module_name AS _module_name, ' .
                 'whups_priorities.priority_name AS _priority_name, ' .
                 'whups_versions.version_name AS _version_name, ' .
-                'whups_versions.version_name + \': \' +
whups_versions.version_description AS _version_fullname';
+                'whups_versions.version_name || \': \' ||
whups_versions.version_description AS _version_fullname';
 
             $join  = 'INNER JOIN whups_types ON whups_tickets.type_id =
whups_types.type_id';
             $join .= ' INNER JOIN whups_states ON whups_tickets.state_id =
whups_states.state_id';
@@ -769,7 +769,7 @@
         if (empty($module)) {
             return array();
         }
-        return $this->_getAssoc("SELECT version_id, version_name + ': ' +
version_description FROM whups_versions WHERE module_id = $module");
+        return $this->_getAssoc("SELECT version_id, version_name || ': '
|| version_description FROM whups_versions WHERE module_id = $module");
     }
 
     function getVersion($versionID)
---------------------- multipart/parallel attachment--



>From jan@horde.org Date: Thu,  7 Mar 2002 01:18:11 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact whups-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list whups@lists.horde.org
Received: (qmail 49078 invoked from network); 7 Mar 2002 00:43:08 -0000
Received: from mailout05.sul.t-online.com (194.25.134.82)
  by clark.horde.org with SMTP; 7 Mar 2002 00:43:08 -0000
Received: from fwd03.sul.t-online.de 
	by mailout05.sul.t-online.com with smtp 
	id 16iljm-0006vQ-01; Thu, 07 Mar 2002 01:26:26 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.42.242]) by fmrl03.sul.t-online.com
	with esmtp id 16iljY-1mqdLEC; Thu, 7 Mar 2002 01:26:12 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g270IBR19723
	for <whups@lists.horde.org>; Thu, 7 Mar 2002 01:18:11 +0100
Received: from 192.168.60.137 ( [192.168.60.137])
	as user jan@linux by jan.dip.ammma.net with HTTP;
	Thu,  7 Mar 2002 01:18:11 +0100
Message-ID: <1015460291.3c86b1c3790f0@jan.dip.ammma.net>
Date: Thu,  7 Mar 2002 01:18:11 +0100
From: Jan Schneider <jan@horde.org>
To: whups@lists.horde.org
References: <2038985609.1015463241@sauron>
In-Reply-To: <2038985609.1015463241@sauron>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [whups] sql query

Zitat von Mathieu Arnold <arn_mat@club-internet.fr>:

> Hi
> 
> I've been mucking out with the whole horde framework tonight, and, hum
> the
> sql queries are quite really mysql compliant, but not sql compliant.
> 
> I don't know how you could get around that because my patch makes it
> pgsql/sybase/oracle compliant, but no more mysql compliant :)
> 
> maybe you could just not use concatenation and do it afterwards in
> php...

Do these DBs support the concat() function?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


>From chuck@horde.org Date: Thu,  7 Mar 2002 01:53:33 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact whups-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list whups@lists.horde.org
Received: (qmail 60702 invoked from network); 7 Mar 2002 06:54:16 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 7 Mar 2002 06:54:16 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 1C08639CE; Thu,  7 Mar 2002 01:53:34 -0500 (EST)
Received: from 192.168.0.116 ( [192.168.0.116])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  7 Mar 2002 01:53:33 -0500
Message-ID: <1015484013.3c870e6dd4f40@marina.horde.org>
Date: Thu,  7 Mar 2002 01:53:33 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: whups@lists.horde.org
References: <2038985609.1015463241@sauron> <1015460291.3c86b1c3790f0@jan.dip.ammma.net>
In-Reply-To: <1015460291.3c86b1c3790f0@jan.dip.ammma.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [whups] sql query

> > I've been mucking out with the whole horde framework tonight, and, hum
> > the sql queries are quite really mysql compliant, but not sql compliant.

I test everything against MS-SQL as well. Unfortunately not perfect, but 
usually a pretty good litmus test.

I seem to have missed your original message - what patch?

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"A dream which helps you to live your reality with dignity
 and justice is a good dream." - Tariq Ramadan