Mailing List Archive



Back to the month index Back to the list index

James E. Harrell (james_harrell@mindspring.com)
Sat, 10 Apr 1999 21:17:55 -0400


Message-ID: <370FF843.4F119EE@mindspring.com>
Date: Sat, 10 Apr 1999 21:17:55 -0400
From: "James E. Harrell" <james_harrell@mindspring.com>
Subject: un-enforced "unique" indices

Having a problem with unique indices... The index will enforce UNIQUE
when you attempt to insert *new* data, but when you update current data
in an indexed field, it allows non-unique data to be created... any
suggestions?

Basically, I'd like the database to kick back the update as invalid to
avoid doing the unique check manually. That's part of why unique indices
exist, no?

Table looks something like:
  category_name char(30)
  categoryID int
  groupID int

The create index clause looks like this:
 CREATE UNIQUE INDEX idx_cid on categories (categoryID)
 CREATE UNIQUE INDEX idx_cid_gid on categories (category_name, groupID)

Shouldn't this allow duplicate categories ONLY if the groupID is
different? In other words, several different groups can have categories
by the same name. But a single group can not have 2 categories by the
same name.

Version Details :-

        msqladmin version 2.0.8
        mSQL server version 2.0.8
        mSQL protocol version 23
        mSQL connection Localhost via UNIX socket
        Target platform Linux-2.0.29-i586

Configuration Details :-

        Default config file /home/jharrell/msql/msql.conf
        TCP socket 1114
        UNIX socket /home/jharrell/msql/msql2.sock
        mSQL user jharrell
        Admin user jharrell
        Install directory /home/jharrell/msql
        PID file location /home/jharrell/msql/msql2d.pid
        Memory Sync Timer 30
        Hostname Lookup True

ps: the reason this message is cc'd to bambi- I haven't seen any replies
to a recent question I posted; don't know if the messages are getting
through or not!
From lecrosnp@club-internet.fr Sun Apr 11 09:42:07 1999
Received: from front4.grolier.fr (front4.grolier.fr [194.158.96.54])
        by services.bunyip.com (8.8.5/8.8.5) with ESMTP id JAA02259
        for <msql-list@services.bunyip.com>; Sun, 11 Apr 1999 09:42:05 -0400 (EDT)
Received: from LOCALNAME (ppp-104-1.villette.club-internet.fr [194.158.104.1])
        by front4.grolier.fr (8.9.3/No_Relay+No_Spam_MGC990224) with SMTP id PAA06401
        for <msql-list@services.bunyip.com>; Sun, 11 Apr 1999 15:42:03 +0200 (MET DST)
Message-ID: <371117E0.4043@club-internet.fr>
Date: Sun, 11 Apr 1999 14:45:04 -0700
From: Patrick LECROSNIER <lecrosnp@club-internet.fr>
Reply-To: lecrosnp@club-internet.fr
Organization: particulier
X-Mailer: Mozilla 3.01 [fr]C-CLUB (Win16; I)
MIME-Version: 1.0
To: msql-list@services.bunyip.com
Subject: http_referer
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
Is it possible to know the name of a page of redirection ?
And in this case they are nothing in http-referer :-(
The page of redirection is in phtml v.2

Thank you very much.
Patrick