Re: empty_blob() equivalent

2004-07-20 Thread Jeyabalan Murugesan Sankarasubramanian
Hi, Actually i need to add a wavefile in byte[] format to the table with column name blob_col of type blob. In Oracle empty_blob() is inserted into the table. While retrieving OracleResultSet supports getBLOB(). This returns oracle.sql.BLOB. From this i am able to insert the byte[] with the

Re: Problem with DATE_ADD - Michael Stassen, July 16 2004 7:48am

2004-07-20 Thread Michael Stassen
Gerard Gilliland wrote: Michael: Again, Thank you for your excellent suggestions and quick response !! I agree that Two types of data means you should use two columns. There is no excuse for bad design. (I inherited the database and moved it to MySQL -- I should have converted then.) I

Re: Relational Integrity

2004-07-20 Thread Martijn Tonies
Hi Roy, If this is a business application, don't go without transactions and foreign keys. Plain and simple. Use InnoDB. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene Productions http://www.upscene.com I need so

Re: Relational Integrity

2004-07-20 Thread Singer Wang
RAM is Cheap, so is a faster processor.. (InnoDB requires more RAM/Processor then the simpler MyISAM).. but your data and downtime is probably a lot more expensive. Its well worth it going with InnoDB. For most of what I do, I use a combination of InnoDB and HEAP Tables. On Tue, Jul 20, 2004

join subquerie rand problem

2004-07-20 Thread Gerske, Sebastian
Hello list, i still need a solution for my 3 table join rand problem, im using version 4.1 now so subqueries are possible: explanation: i have 3 tables lets say: fruits: id, name 1banana 2apple 3strawberry fruits_animals id, id_fruits, id_animals 11 2 2

MaxDB and cluster

2004-07-20 Thread jschung
I am new to MaxDB and clustering. It seems that both products provide enterprise features and high availability. Is clustering replacing MaxDB? What are the difference between them? Are they targeting different users? Thanks. -- MySQL General Mailing List For list archives:

Re: RE: Upgrade 3.23 to 4.1.x

2004-07-20 Thread MaFai
Dear Victor Pendleton: It contains both isam innodb tables. At 2004-07-14, 12:29:39 you wrote: What table types are you currently using? -Original Message- From: MaFai To: [EMAIL PROTECTED] Sent: 7/13/04 10:09 PM Subject: Upgrade 3.23 to 4.1.x Dear all: Do any

Fw: Confirm 2 question in replication.

2004-07-20 Thread MaFai
Dear [EMAIL PROTECTED]: Dear, [EMAIL PROTECTED], I'd like to confirm 2 queries on the replication as follows: 1. Could we not using root on mysql for setting up the replication? ( I think no) 2. Could the password for replication be changed? ( I think Yes) Best regards.

Re: Help! Nasty big table efficiency issues with GROUP BY

2004-07-20 Thread Chris Elsworth
On Tue, Jul 20, 2004 at 10:39:00AM +1000, Lachlan Mulcahy wrote: Chris, Have you checked your following server configurables: sort_buffer_size: - This is the size of the cache created by _each_ thread that requires ORDER BY or GROUP BY in a query. If you are doing a lot of large

Re: join subquerie rand problem

2004-07-20 Thread Gerske, Sebastian
help me please :/ Gerske, Sebastian [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hello list, i still need a solution for my 3 table join rand problem, im using version 4.1 now so subqueries are possible: explanation: i have 3 tables lets say: fruits: id, name 1

Updating a field from multiple rows.

2004-07-20 Thread Stuart Grimshaw
Further to my Full Text question the other day, I'm trying to add the parimetric data to the field that gets searched. We have a script that runs periodically to update this table. I can do what I want in that script no problem, but it would be more elegent if I could acheive the same results

Re: i cant connect to mysql from other machine

2004-07-20 Thread [EMAIL PROTECTED]
(excuse for my english) thx for your interest Lachan.. the problem was the attribute bind_address at the my.cnf :) thanks d2clon On Tuesday 20 July 2004 02:59, Lachlan Mulcahy wrote: d2, By the looks of it the client machine you are trying to connect from can resolve the hostname of your

ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-20 Thread Richard Clarke
Mysql won't stop eating RAM!! :( Machine is a quad xeon 2.4 with 4 gigs of RAM. Linux db2 2.6.7-rc3 #1 SMP Thu Jun 17 12:51:21 UTC 2004 i686 Intel(R) Xeon(TM) CPU 2.40GHz GenuineIntel GNU/Linux Mysql is 4.1.3-beta Compile options are, ./configure --enable-thread-safe-client --enable-assembler

Re: Fw: Confirm 2 question in replication.

2004-07-20 Thread Egor Egorov
MaFai [EMAIL PROTECTED] wrote: I'd like to confirm 2 queries on the replication as follows: 1. Could we not using root on mysql for setting up the replication? ( I think no) No. 2. Could the password for replication be changed? ( I think Yes) mysqladmin -uusername -ppassword password

Re: data design question

2004-07-20 Thread Egor Egorov
Justin French [EMAIL PROTECTED] wrote: Should I worry at 40,000? 100,000? Or will the indexing of the siteID keep everything extensible? Indexing is designed to keep SELECT speed small with no matter how much data it is. You should ensure that the siteID index is properly used (use EXPLAIN

MYSQL ROWS

2004-07-20 Thread Remember14a
Dear Friends, I have 7000 rows in mysql table, it crashes often, is number of rows reason, or can their be any other reason, I want to increase number of rows and prevent further crashes how do I do the same, Inform ,please

Re: Erro:Got error 28 from table handler!

2004-07-20 Thread Egor Egorov
[EMAIL PROTECTED] wrote: qual o significado da seguinte menssagem de erro do MySQL: Got error 28 from table handler? [EMAIL PROTECTED] egor]$ perror 28 Error code 28: No space left on device -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is

Re: Optimize problem on BIG table

2004-07-20 Thread Egor Egorov
Aman Raheja [EMAIL PROTECTED] wrote: $ perror 28 Error code 28: No space left on device I agree that there is not much disk space. THE ISSUE: I want to reclaim the disk space that should be freed because of the millions of records I deleted. I need disk space to reclaim disk space?

Re: how the redhat 9.0 adds the mysql user:

2004-07-20 Thread Egor Egorov
j.rabbit [EMAIL PROTECTED] wrote: This is how the redhat 9.0 mysql.spec file adds the mysql user: ' useradd -M -o -r -d /var/lib/mysql -s /bin/bash -c MySQL Server -u = 27 mysql ' Anybody know why the shell is '/bin/bash' instead of '/sbin/nologin' = like other daemon users? Is this

Re: query locking up the system

2004-07-20 Thread Egor Egorov
Aman Raheja [EMAIL PROTECTED] wrote: Has anyone experienced this kind of load. The hardware is not an issue - it is a dual processor, 1GB RAM etc. Suggections? Tell us your MySQL server version, OS version, describe the structure of the table and if possible show EXPLAIN SELECT on the

RE: MYSQL ROWS

2004-07-20 Thread Victor Pendleton
Is anything being logged to the error log? What messages are your receiving? -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 7/20/04 7:45 AM Subject: MYSQL ROWS Dear Friends, I have 7000 rows in mysql table, it crashes often, is number of rows reason, or can

Re: RAM-usage and hardware upgrade 10gb RAM

2004-07-20 Thread Egor Egorov
Jan Kirchhoff [EMAIL PROTECTED] wrote: Money is not really an issue but of course we don't want to waste it for scsi-hardware if we can reach almost the same speed with hardware sata-raids. 'Almost' is a key word. Some SCSI disk are working at 15k RPM, which will give you a HUGE MySQL

Re: ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-20 Thread Egor Egorov
Richard Clarke [EMAIL PROTECTED] wrote: I think that is possibly related to some known glibc/gcc issues. Please download official MySQL binaries from http://www.mysql.com/ install them and try the same on it. Should work smoothly. Mysql won't stop eating RAM!! :( Machine is a quad xeon 2.4

Re: MYSQL ROWS

2004-07-20 Thread Egor Egorov
[EMAIL PROTECTED] wrote: I have 7000 rows in mysql table, it crashes often, is number of rows reason, or can their be any other reason, I want to increase number of rows and prevent further crashes how do I do the same, Inform ,please Please tell your MySQL version, your OS version,

Re: join subquerie rand problem

2004-07-20 Thread Gerske, Sebastian
i think its not even possible with subqueries Gerske, Sebastian [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] help me please :/ Gerske, Sebastian [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hello list, i still need a solution for my 3 table join

Re: join subquerie rand problem

2004-07-20 Thread SGreen
Sebastian, I don't think we completely understand your questionor someone would have responded long before now. Let me see if I can rephrase the situation and maybe we can get a response. You have two tables that contain objects (your example: fruits and animals) and a table that relates

Re: join subquerie rand problem

2004-07-20 Thread Gerske, Sebastian
well neither a,b or c :P i have lets say 1000 different fruits and 1000 different animals with many to man relations now i want to extract 100 differnt fruits held by 100 different animals without dupes of fruit or animal [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]

Business Objects and MYSQL

2004-07-20 Thread janie . downie
Can anyone tell me if it's possible to use the reporting tool Business Objects with a MySQL database? Thanks Janie Downie *** Important. Confidentiality: This communication is intended for the above-named person and

Re: Updating a field from multiple rows.

2004-07-20 Thread SGreen
Have you looked at the GROUP_CONCAT() function? (http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html) It would make your update look like: CREATE TABLE tmpList SELECT ts.product_uid as UID, Group_Concat(ev.Text) as newtext FROM X_Search.text_search as ts INNER JOIN especee as es

Re: ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-20 Thread Richard Clarke
Egor, But my UDF's are very important for the process of my statistics. I need 3 functions webdomain(val) = convert http://www.google.com/blah into google.com geoip_lookup(123.123.123.123.) = country code geoip_lookup_isp(123.123.123.123) = isp I will try the mysql binaries and disable

(U) Chris Rock Lights it up !!!!

2004-07-20 Thread Johnson, Michael
CLASSIFICATION: UNCLASSIFIED http://www.laserp.com/chris_rockfp.htm Classification: UNCLASSIFIED -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: join subquerie rand problem

2004-07-20 Thread SGreen
OK, This is a similar solution to a problem posted last month (he was trying to match debits to credits). Here's how it works: Create a temporary table to match your fruits_animals table except you want to put UNIQUE INDEXES on both columns individually. Then you run an INSERT IGNORE to copy

Re: ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-20 Thread Egor Egorov
Richard Clarke [EMAIL PROTECTED] wrote: But my UDF's are very important for the process of my statistics. I need 3 functions webdomain(val) = convert http://www.google.com/blah into google.com geoip_lookup(123.123.123.123.) = country code geoip_lookup_isp(123.123.123.123) = isp I will

Re: join subquerie rand problem

2004-07-20 Thread Gerske, Sebastian
brings the same result as select * from fruit, fruit_animal, animal where fruit.id = fruit_animal.id_fruit AND fruit_animal.id_animal = animal.id order by rand() or i got something wrong the next thing is that the tables are hughe, like 3 millionen rows (growing) thanks

Re: ARGH - Mysql won't stop eating RAM and finally it SEGV's

2004-07-20 Thread Richard Clarke
I have switched to the mysql standard binary and it helped in no way at all. If anything it made the situation worse. It seems that mysql grows even worse than before. Mysql uses an extra 1MB roughly every 5-10 seconds. Richard On Tue, 20 Jul 2004 14:44:39 +0100, Richard Clarke [EMAIL PROTECTED]

Re: join subquerie rand problem

2004-07-20 Thread Arnaud
i have lets say 1000 different fruits and 1000 different animals with many to man relations now i want to extract 100 differnt fruits held by 100 different animals without dupes of fruit or animal That's a nice one ! I'll give it a try : The point is to get 100 random couples of (id_fruits,

Re: RAM-usage and hardware upgrade 10gb RAM

2004-07-20 Thread Jan Kirchhoff
Egor Egorov wrote: Money is not really an issue but of course we don't want to waste it for scsi-hardware if we can reach almost the same speed with hardware sata-raids. 'Almost' is a key word. Some SCSI disk are working at 15k RPM, which will give you a HUGE MySQL performance growth

Re: RAM-usage and hardware upgrade 10gb RAM

2004-07-20 Thread Brent Baisley
The single biggest difference between SATA (or any IDE) and SCSI is command queuing. Command queuing allows the drive to intelligently reorder reads and writes to make things faster. An ATA drive executes a bunch of commands in the order it gets them, which can be slow if it needs to write data

Re: join subquerie rand problem

2004-07-20 Thread Arnaud
Oops, this was not correct, excuse me ! You can have duplicate id_animals with this query. You can do it like this : SELECT my_id_fruits, my_id_animals FROM (SELECT id_fruits AS my_id_fruits, (SELECT id_animals FROM fruits_animals WHERE id_fruits = my_id_fruits

CIDR ranges in MySQL permissions?

2004-07-20 Thread Andrew Braithwaite
Hi All, Has anyone had any experience with using IP address ranges in MySQL permissions? It would be easy if you had a whole class C for example because you would be able to do: Grant all privileges on *.* to someuser@'192.87.12.%'; But if you only wanted to give permissions to a CIDR range

RE: CIDR ranges in MySQL permissions?

2004-07-20 Thread Andrew Braithwaite
Sorry - a /32 is a single ip - I meant a /27 :) A -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] Sent: Tuesday 20 July 2004 16:16 To: [EMAIL PROTECTED] Cc: Karl Skidmore Subject: CIDR ranges in MySQL permissions? Hi All, Has anyone had any experience with using

newbie join issue

2004-07-20 Thread Edward Ritter
I've got a task that's gonna require me to compare one table to another and remove the rows from the first table that are found in the second table that match email_address. I'm running 4.0.20a-nt-log. The first table has 10 colomns and about 50K records, and the second table has 46 columns

Primary Keys

2004-07-20 Thread Rui Monteiro
Mello, I was wondering why canto r how can I put 2 primary keys on a table? Here's na example on Oracle language: CREATE TABLE FacturaMusica( CodFactura number(4), CONSTRAINTS FK_FacturaMusica_CodFactura FOREIGN KEY(CodFactura) REFERENCES Factura(CodFactura),

Re: newbie join issue

2004-07-20 Thread Stefan Kuhn
I would expect that the speed problems are due to missing indices. Did you do proper indexing? If unsure, post your table structures and query. Stefan Am Tuesday 20 July 2004 17:45 schrieb Edward Ritter: I've got a task that's gonna require me to compare one table to another and remove the

Re: Primary Keys

2004-07-20 Thread SGreen
Your example has 1 Primary Key and 2 Foreign Keys. Please post a sample data structure and state (not in SQL) what situation you want to achieve. If you need more constraints on the table to prevent creating duplicates you can create additional UNIQUE Keys but, by definition, any table

Re: newbie join issue

2004-07-20 Thread Edward Ritter
Stefan: I added an index column to each after I imported. Here's a listing of the two tables. la_entire ++-+--+-+-++ | Field | Type| Null | Key | Default | Extra |

Re: newbie join issue

2004-07-20 Thread Garth Webb
What is the 'idx' for when you already have an 'id' column? Also, you need an index on the column that you are joining on; having a single indexed column on a table doesn't automatically improve all queries against that table. Put an index on the 'email_address' fields of both tables. You'll

Re: newbie join issue

2004-07-20 Thread Edward Ritter
Thanks, I'll take a look at that. The id isn't unique, so that's why I added the idx column. Does my query look okay beyond that? I'll add the additional indexes and try again. Ed Garth Webb said the following on 7/20/2004 1:03 PM: What is the 'idx' for when you already have an 'id' column?

Re: RAM-usage and hardware upgrade 10gb RAM

2004-07-20 Thread David Griffiths
We just put a new dual-Opteron server into our production environment. We ordered a Megaraid SCSI card and five 10k drives, and a 3Ware Escalade SATA card with six 7200 RPM drives (Maxtor) to see which ones were best. Our network guy did a bunch of benchmarking on the drives and found that

Re: RAM-usage and hardware upgrade 10gb RAM

2004-07-20 Thread Marc Slemko
On Mon, 19 Jul 2004 18:13:36 +0200, Jan Kirchhoff [EMAIL PROTECTED] wrote: Hi, We are currently using a 4.0.16-replication-setup (debian-linux, kernel 2.4.21, xfs) of two 2.4ghz Intel-Pentium4 systems with 3gig RAM each and SCSI-Hardware-Raid, connected via gigabit-ethernet. We are reaching

Re: newbie join issue

2004-07-20 Thread Edward Ritter
Thanks, adding the indexes worked beautifully. I'll go knock my head on the desk now. Thanks for your time :) Ed Edward Ritter said the following on 7/20/2004 1:08 PM: Thanks, I'll take a look at that. The id isn't unique, so that's why I added the idx column. Does my query look okay beyond

RE: Primary Keys

2004-07-20 Thread SGreen
I understand your question. I am so sorry to be so slow today :-) You want to know how to create a PRIMARY KEY that is composed of more than one column. Most of the time when we declare a PRIMARY KEY on a table, we do it by putting the keywords PRIMARY KEY at the end of the column definition,

Replication Overhead and Benchmarks

2004-07-20 Thread Nathan
Hi, Does anyone know of any written stats on how much overhead for CPU/ Disk IO replication has for a single master and a single slave? I am looking for any detailed stats on the proformance issues associated with replication. thanks -Nathan -- MySQL General Mailing List For list archives:

Re: Nested query with GROUP BY ... HAVING COUNT(*) ... hangs 4.1.3 beta

2004-07-20 Thread Leo Siefert
Thanks for your response. [EMAIL PROTECTED] 7/19/2004 11:47:39 AM It looks like your IN statement is forcing your inner SELECT to execute once PER ROW of your main table. It is asking the engine to make sure that _each and every_ id value in main meets the condition in the inner select. So,

Question about column name case sensitive

2004-07-20 Thread Ying Lu
Hello, I have a question about column name case sensitive. Currently, we use MySQL 3.23.32 running on Linux. I am trying to use JDBC to get email from table T1 T1( id char(3), name varchar(12), Emailvarchar(16) ) Now If I say, try{ ... String email =

Re: empty_blob() equivalent

2004-07-20 Thread Dan Nelson
In the last episode (Jul 20), Jeyabalan Murugesan Sankarasubramanian said: Actually i need to add a wavefile in byte[] format to the table with column name blob_col of type blob. In Oracle empty_blob() is inserted into the table. While retrieving OracleResultSet supports getBLOB(). This

remote connection php code

2004-07-20 Thread Business A2Z
Hi All Could someone give me a clue or a snippet of PHP code I can test a romte connection to my MySQL DB for my website please? Thank you Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Removing Entries From a MySQL Table

2004-07-20 Thread Michael Mason
Ive been looking through the manual and searching the web for the command and syntax used to do the above. I basically just want to clear a table I use for logon entries. Can anyone help with this please? Michael Mason Business Support Services Arras People Tel: 01706 342310

can not start mysql daemon

2004-07-20 Thread pohlhaut
Description: I can not start the mysqld daemon. I had it running for a long time, but then had to reboot. Then I could no longer connect. How-To-Repeat: followed the directions on http://wiki.amazon.com/?MySQLInstallation, but to no avail. When I run the first

Re: Removing Entries From a MySQL Table

2004-07-20 Thread Andreas Ahlenstorf
Hello, Michael Mason schrieb am Dienstag, 20. Juli 2004 um 22:46: I basically just want to clear a table I use for logon entries. Can anyone help with this please.? http://dev.mysql.com/doc/mysql/en/TRUNCATE.html http://dev.mysql.com/doc/mysql/en/DELETE.html HTH, A. -- MySQL General

Re: Cluster on Solaris 9/x86 works

2004-07-20 Thread Justin Swanhart
You do have ByteOrder: Big in the .ini file for the sparc database servers, right? --- Alexander Haubold [EMAIL PROTECTED] wrote: Hi everyone, Just to follow up on my previous post regarding Cluster on Sparc/Solaris 9: On an x86 Solaris 9 machine that was set up similar to the Sparc

RE: Removing Entries From a MySQL Table

2004-07-20 Thread Sommerfield, Thomas P
Hello; DELETE FROM table_name WHERE 1 ; This command will remove all rows from the table. For more information, see: http://dev.mysql.com/doc/mysql/en/DELETE.html Make sure you have a backup if you think you may need the data in the future. -Tom -Original Message- From: Michael

Re: Removing Entries From a MySQL Table

2004-07-20 Thread Andy Ford
Or simply, Delete from table_name; Andy -Original Message- From: Sommerfield, Thomas P [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED]; MySQL Mailing List [EMAIL PROTECTED] Sent: Tue Jul 20 22:16:14 2004 Subject: RE: Removing Entries From a MySQL Table Hello; DELETE FROM

Re: remote connection php code

2004-07-20 Thread jeffrey_n_Dyke
Hi All Could someone give me a clue or a snippet of PHP code I can test a romte connection to my MySQL DB for my website please? Just take the one you're currently using and replace 'localhost' with 'someotherserver.com' $cnx = mysql_connect('someotherserver.com','uname','pword');

Removing a specific set of duplicates

2004-07-20 Thread Scott Haneda
Mysql 4 I have a slightly tougher than usual condition in which I want to remove duplicates. I am not sure how to deal with this and am looking for your suggestions. The table that stores my data is called addresses, it contains among others, a field called email_address. Within this table

Re: Replication Overhead and Benchmarks

2004-07-20 Thread Jeremy Zawodny
On Tue, Jul 20, 2004 at 10:57:02AM -0700, Nathan wrote: Hi, Does anyone know of any written stats on how much overhead for CPU/ Disk IO replication has for a single master and a single slave? I am looking for any detailed stats on the proformance issues associated with replication.

Re: Removing a specific set of duplicates

2004-07-20 Thread Wesley Furgiuele
Scott: Rather than make the email address column unique, since you want to allow multiple email address instances, you can make a unique index based on email_address+group. Wouldn't that help, or is that still too simple for your situation? Regarding temporary tables, from the MySQL manual:

Re: Removing a specific set of duplicates

2004-07-20 Thread Scott Haneda
on 7/20/04 4:10 PM, Wesley Furgiuele at [EMAIL PROTECTED] wrote: Rather than make the email address column unique, since you want to allow multiple email address instances, you can make a unique index based on email_address+group. Wouldn't that help, or is that still too simple for your

Re: Removing a specific set of duplicates

2004-07-20 Thread Wesley Furgiuele
Scott: Sorry, should have included it... http://dev.mysql.com/doc/mysql/en/CREATE_INDEX.html The basic syntax you're looking to use is ALTER TABLE tablename ADD UNIQUE `index_name` ( email_address, group ) Wes On Jul 20, 2004, at 7:45 PM, Scott Haneda wrote: on 7/20/04 4:10 PM, Wesley Furgiuele at

cannot install mysql on linux using RPM's

2004-07-20 Thread Levi Campbell
Hi, I'm trying to install MySQL on Debian Linux on an old computer whe had lying around. (Pentium 2 or three) and I'm trying to install the RPM files so I can install the software. my problem is with the Perl debian packages, I can't get them configured, can anyone help?

Need help with a select. Regex?

2004-07-20 Thread jabbott
What I am trying to do is select the hostname out of a refering url. Such as: http://www.google.com/search?hl=enie=UTF-8q=%22Third+Park+Point+Beach+Water+Contact+Advisory+Posted%3B+May+Indicate+Long-Term+Problem%22btnG=Google+Search All I really want to get is: http://www.google.com/ So I

Re: Removing a specific set of duplicates

2004-07-20 Thread Scott Haneda
on 7/20/04 4:10 PM, Wesley Furgiuele at [EMAIL PROTECTED] wrote: Rather than make the email address column unique, since you want to allow multiple email address instances, you can make a unique index based on email_address+group. Wouldn't that help, or is that still too simple for your

Re: phpMyAdmin does not show mysql-db, MacOS

2004-07-20 Thread Peter Paul Sint
At 0:48 h +0200 2004.07.20, Peter Paul Sint wrote: After installing mysql4.1 on Mac OS 10.2.8 mysql-standard-4.1.3-beta-apple-darwin6.8-powerpc php and phpMyAdmin 2.5.7-pl1 (following the tutorial http://www.macservers.org/feature-2.html ) Using http://localhost/phpMyAdmin/index.php (or

Re: Removing a specific set of duplicates

2004-07-20 Thread Wesley Furgiuele
First off, the unique index is something you define for the table once. Being unique, you won't be allowed to add in another record with the same values as an record that already exists in the table. And yes, once you set it up, INSERT IGNORE would allow your query to simply skip the insertion

Re: Removing a specific set of duplicates

2004-07-20 Thread Scott Haneda
on 7/20/04 9:44 PM, Wesley Furgiuele at [EMAIL PROTECTED] wrote: First off, the unique index is something you define for the table once. Being unique, you won't be allowed to add in another record with the same values as an record that already exists in the table. I thought so, thanks. And

Re: Need help with a select. Regex?

2004-07-20 Thread Wesley Furgiuele
To get http://www.google.com/; out of the URL, you can do this: LEFT( referer, LENGTH( SUBSTRING_INDEX( referer, '/', 3 ) ) + 1 ) If you don't care about the trailing slash, you can use just the SUBSTRING_INDEX() portion: SUBSTRING_INDEX( referer, '/', 3 ) Using the LENGTH() function just helps

Re: Removing a specific set of duplicates

2004-07-20 Thread Wesley Furgiuele
Scott: Yeah, exactly. The ON DUPLICATE KEY is useful if your table has something like a last modified or last accessed column that is relevant for what you're doing. It is just an easier way to accomplish INSERT IGNORE plus then doing an UPDATE on all the rows that got ignored, in case you

Re: Removing a specific set of duplicates

2004-07-20 Thread Scott Haneda
on 7/20/04 10:06 PM, Wesley Furgiuele at [EMAIL PROTECTED] wrote: Scott: Yeah, exactly. The ON DUPLICATE KEY is useful if your table has something like a last modified or last accessed column that is relevant for what you're doing. It is just an easier way to accomplish INSERT IGNORE plus

Re: Need help with a select. Regex?

2004-07-20 Thread Wesley Furgiuele
Just a follow-up oops... I misread the manual page when verifying the SUBSTRING_INDEX() syntax. It states that it returns everything before _count_ instances of the delimiter, so naturally if you feed it a value that exceeds the actual instances of the delimiter, you get back the whole

Re: Removing a specific set of duplicates

2004-07-20 Thread Michael Stassen
I'd suggest turning those around: ALTER TABLE tablename ADD UNIQUE `index_name` (group, email_address) Why? For purposes of keeping the combination of group and email unique, the order doesn't matter, but the leftmost part of the index can be used just as if it were a single column index.