LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2004, 10:34 AM   #1
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Rep: Reputation: 32
Mysql question


I'm trying to set up a mysql back end to proftpd -- I have a table for uid and gid

The problem is that when I try to add a user that has the same gid it gives me an error that number is already in the table. Now this is sort of fine for uid but for the guid it creates a problem. Many users need to be in the same gid.

Anyone know what mysql setting needs to be set so that the column in that table will alow duplicate entrys?


Oops I was writing guid when I ment gid -- sorry for the confusion

Last edited by flashingcurser; 07-18-2004 at 10:41 AM.
 
Old 07-22-2004, 07:38 AM   #2
nephilim
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: Debian (server), Kubuntu (desktop)
Posts: 248

Rep: Reputation: 30
The default option of a column is that it can hold duplicate values. If you make the column a primary key or add a UNIQUE constraint, than it can't hold duplicates.

I'm guessing in your case it's the first (primary key columns can NEVER have duplicates).

Maybe you should give a detailed explanation of your problem (table layouts, primary keys, foreign key relationships). That way we can help you out, right now it's all kind of blury.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
MySQL question... kith Linux - General 3 03-06-2004 06:40 PM
MySQL Question NoBrains Linux - Software 2 03-01-2004 10:10 PM
MySQL question TraCe66 Linux - Newbie 11 07-15-2003 02:35 PM
MySQL question ascii2k Linux - General 1 03-27-2002 04:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration