Finding Data in One of Two Tables

2011-02-02 Thread Hal Vaughan
I'm using this query in a Perl program: SELECT Distinct x.Search FROM $source.Searches AS x LEFT JOIN searching.Status AS s ON x.Search=s.Search AND s.Source='$source' WHERE x.RedoTime<'$now' AND s.Search IS NULL This program runs other programs that do internet searches. I have diffe

Re: Data in Table Is Different When Seen From Different Sources

2011-01-26 Thread Hal Vaughan
On Jan 26, 2011, at 5:11 PM, mis...@poczta.fm wrote: > "Hal Vaughan" wrote: >> I'm having the strangest issue. I am using a Perl program to test out some >> other Perl programs and all the Perl connections with MySQL are "normal", as >> in

Data in Table Is Different When Seen From Different Sources

2011-01-26 Thread Hal Vaughan
I'm having the strangest issue. I am using a Perl program to test out some other Perl programs and all the Perl connections with MySQL are "normal", as in I use the standard interface. But in the test program I'm just using this: $out = `mysql --table -e"SELECT * FROM search.Status"`; print "$

Re: Running Queries When INSERTing Data?

2010-11-08 Thread Hal Vaughan
e system was running smoothly and that's a long gap with no programming work! Hal > > Regards, > Gavin Towey > > -Original Message- > From: Hal Vaughan [mailto:h...@halblog.com] > Sent: Monday, November 08, 2010 10:18 AM > To: mysql@lists.mysql.com > Subj

Running Queries When INSERTing Data?

2010-11-08 Thread Hal Vaughan
I'm redesigning some software that's been in use since 2002. I'll be working with databases that will start small and grow along the way. In the old format, data would come to us in mega-big text files that had to be parsed and manipulated and so on with Perl to remove crap and finally produc

File Permissions On Database Files

2006-01-02 Thread Hal Vaughan
My MySQL databases are stored in a directory that is with the rest of my project. I am using rsync to back up the entire project, including the database files. I'd much rather do it this way than to create files with mysqldump. Whenever MySQL creates a new database, the file is owned by the

Re: Numbering Rows on Output

2005-11-28 Thread Hal Vaughan
On Monday 28 November 2005 04:45 pm, Dan Nelson wrote: > In the last episode (Nov 28), Hal Vaughan said: > > I have a table that lists the tasks a program has to do. Lately I've > > found I can have an "at-a-glance" status report of how things are > > going on

Numbering Rows on Output

2005-11-28 Thread Hal Vaughan
I have a table that lists the tasks a program has to do. Lately I've found I can have an "at-a-glance" status report of how things are going on by writing a loop (in bash scripting, on Linux, btw) that uses "mysql -e" to display the list of tasks and their current state. It's quick and a lot s

Re: Seeking Opinions

2005-11-25 Thread Hal Vaughan
On Friday 25 November 2005 01:44 pm, Johan wrote: > > Option One > > Related tables. Table one (clipart pieces) contains ClipartID and > > ClipartName fields. Table two (keywords) contains KeywordID, ClipartID > > and Keyword fields. This option will create an incredibly large related > > table (ke

Possible Transaction Delay?

2005-11-25 Thread Hal Vaughan
I have a number of Perl programs running on a Linux system, all using MySQL. I have to keep track of programs, so I know which ones are working with which set of data, so programs check in when they start by creating a table entry and log out when they end by removing that table entry, but ALSO

Re: Questions on INSERT IGNORE

2005-11-01 Thread Hal Vaughan
Follow up at bottom: On Tuesday 01 November 2005 04:15 pm, Hal Vaughan wrote: > On Tuesday 01 November 2005 03:35 pm, [EMAIL PROTECTED] wrote: > > Which tables can have duplicate records in them should be something > > decided BEFORE you begin to populate the tables. 99.999% of the

Re: Questions on INSERT IGNORE

2005-11-01 Thread Hal Vaughan
On Tuesday 01 November 2005 03:35 pm, [EMAIL PROTECTED] wrote: > Which tables can have duplicate records in them should be something > decided BEFORE you begin to populate the tables. 99.999% of the time, each > row of any one table should be different from every other row on the same > table. Tha

Questions on INSERT IGNORE

2005-11-01 Thread Hal Vaughan
I want to be sure I understand "INSERT IGNORE..." correctly before I start depending on it. Up until now, I have not been using any kind of key or unique index, since many of my tables are created automatically and, until now, it has been difficult for me to create a way to distinguish between

Problem starting MySQL With Moved Data Directory

2005-10-22 Thread Hal Vaughan
I'm using MySQL 4.0.24-10 on Debian Sarge (Linux, and the stable branch of Debian, just to clarify). I had a setup of a program I've been working on for several years that is on a RAID. I changed MySQL's data directory so it will be on the same RAID and backed up, along with all my other data

Limiting "DISTINCT" To One Column

2005-09-29 Thread Hal Vaughan
I have a query like this: SELECT DISTINCT Channel, ChannelType, Source FROM ChannelStatus; Each channel is supposedly listed in this table only 1 time, but just in case, what I really want to do is make sure that no channels are duplicated. Is there some way to make the keyword "DISTINCT" appl

Re: INSERT IGNORE Doesn't Seem To Work

2005-08-25 Thread Hal Vaughan
On Thursday 25 August 2005 04:44 am, [EMAIL PROTECTED] wrote: > Hal Vaughan <[EMAIL PROTECTED]> wrote on 24/08/2005 17:41:36: > > #> > > > Okay, so INSERT IGNORE only works if I am avoiding duplicate keys. Is > > there > > > any way to use INSERT the way

Re: INSERT IGNORE Doesn't Seem To Work

2005-08-24 Thread Hal Vaughan
On Wednesday 24 August 2005 02:47 am, Hal Vaughan wrote: > I may have a misunderstanding of this, but as I have been told, if I have a > table with 3 columns, Idx (an Index column, unique, auto-increment), Name, > Value (both varchar), and I try a command like this: > > INSERT IGNO

INSERT IGNORE Doesn't Seem To Work

2005-08-23 Thread Hal Vaughan
I may have a misunderstanding of this, but as I have been told, if I have a table with 3 columns, Idx (an Index column, unique, auto-increment), Name, Value (both varchar), and I try a command like this: INSERT IGNORE INTO myTable SET Name = "Variable1", Value = "100"; or INSERT IGNORE INTO myTa

Re: confirm subscribe to mysql@lists.mysql.com

2005-08-23 Thread Hal Vaughan
On Wednesday 24 August 2005 02:25 am, [EMAIL PROTECTED] wrote: > To confirm that you would like > > [EMAIL PROTECTED] > > added to the mysql mailing list, please click on > the following link: > > http://lists.mysql.com/s/mysql/430c12dd47626c9c/hal=thresholddigital.com > > This confirmation ser

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
On Thursday 17 February 2005 11:48 am, Hassan Schroeder wrote: > Hal Vaughan wrote: > > mysqld --port=3307 --datadir=/dbtest/mysql > > mysqld --port=3306 --datadir=/var/lib/mysql > > mysql --port=3307 > > mysql --port=3306 > > > > When I do this, then do a &

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
On Thursday 17 February 2005 10:56 am, Hassan Schroeder wrote: > Hal Vaughan wrote: > > I see that, but even when I bypass them, I can run 2 instances of mysqld, > > it shows up in the task list as 2 separate tasks, but they both use the > > data directory specified in th

Re: Using Different Database Groups On the Same Computer

2005-02-17 Thread Hal Vaughan
On Thursday 17 February 2005 10:18 am, Hassan Schroeder wrote: > Hal Vaughan wrote: > > I've tried this by running 2 instances of mysqld, the first with no > > arguments, and the second like this: > > > > mysqld --port=3307 --datadir=/dbtest/mysql > > &g

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
On Wednesday 16 February 2005 08:52 pm, Hal Vaughan wrote: > I'm not quite sure what search terms to use, otherwise I'm sure I could > find this on Google. > > I have a working install of MySQL on an older computer, running the current > version of my program.  I am ab

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
; +61 8 8408 4273 - Work > +61 417 268 665 - Mobile > +61 8 8408 4259 - Fax > > > -Original Message- > From: Hal Vaughan [mailto:[EMAIL PROTECTED] > Sent: Thursday, 17 February 2005 1:10 PM > To: mysql@lists.mysql.com > Subject: Re: Using Different Database Groups

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
x27;s a big help! Hal > Regards > > David Logan > Database Administrator > HP Managed Services > 148 Frome Street, > Adelaide 5000 > Australia > > +61 8 8408 4273 - Work > +61 417 268 665 - Mobile > +61 8 8408 4259 - Fax > > > -Original Message-

Re: Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
> > +61 8 8408 4273 - Work > +61 417 268 665 - Mobile > +61 8 8408 4259 - Fax > > > -Original Message- > From: Hal Vaughan [mailto:[EMAIL PROTECTED] > Sent: Thursday, 17 February 2005 12:23 PM > To: mysql@lists.mysql.com > Subject: Using Different Database Groups On

Using Different Database Groups On the Same Computer

2005-02-16 Thread Hal Vaughan
I'm not quite sure what search terms to use, otherwise I'm sure I could find this on Google. I have a working install of MySQL on an older computer, running the current version of my program. I am about to start developing a newer version of my program on a new computer. I'd like to have both

Re: Pulling numbers out of a column for a query

2004-01-06 Thread Hal Vaughan
o include the extra column (easier than in queries, since Perl is so good with regexes and can handle 3 digit speeds better). On Monday 05 January 2004 09:37 pm, Hal Vaughan wrote: > I've found an odd problem in queries. > > I have a lot of data regarding vehicle speeds in a survey

Pulling numbers out of a column for a query

2004-01-05 Thread Hal Vaughan
I've found an odd problem in queries. I have a lot of data regarding vehicle speeds in a survey. All the data is in the form: xx/yy, for example 43/55 means that vehicle was clocked at 43 miles per hour in a 55 miles per hour zone. 80/55 means we have a serious speed demon, going 80 in a 55 z

Re: Selecting identical rows from 2 tables (basically Row AND Row)

2003-03-21 Thread Hal Vaughan
t to have the keys to > handle all combinations of columns). > > Brian McCain > > - Original Message - > From: "Hal Vaughan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, March 21, 2003 2:29 PM > Subject: Selecting identical ro

Selecting identical rows from 2 tables (basically Row AND Row)

2003-03-21 Thread Hal Vaughan
I posted earlier this week about how to select from two different tables with an OR -- selecting rows from either table and putting them into one. That was easily accomplished with a UNION statement (AFTER upgrading to MySQL 4.0.x). Now I'm doing almost the opposite. I have two tables, TestCas

Trouble upgrading to 4.0 on Mandrake Linux

2003-03-18 Thread Hal Vaughan
I am running Mandrake Linux 8.2, with the RPMs upgraded to 9.0. It had MySQL 3.23 running on it. I downloaded the current version of 4.0 from mysql.com tonight and isntalled it. I changed the old files from /usr/share/mysql to /usr/share/mysql3.23 and /var/lib/mysql to /var/lib/mysql3.23 (whe

Selecting only ONCE from multiple tables

2003-03-18 Thread Hal Vaughan
I'm just getting used to SQL/MySQL, so there is likely a name for this or it may be well known -- I just haven't either come across it, or haven't made the associations between all the parts yet. I have 2 tables, one a temp table, and they have the same columns. I'd like to be able to select f

Problem matching on only part of a field

2003-03-17 Thread Hal Vaughan
I've been reading through documentation (including the O'Reilly book links on the mysql.com website), and I'm sure this is simple, but I can't seem to find it. I'm managing a mailing list for a client and I want to match on United States zip codes that correspond to different areas. (For non-U