Re: Wierd INSERT ... SELECT syntax problem

2008-09-06 Thread Dan Tappin
changes. Some of the IFs in there are just to suppress output of variable assignment. Hope that helps Brent Baisley On Sep 5, 2008, at 5:44 PM, Dan Tappin wrote: I have an existing data set - here is an example (the real one is more complex than this) LOCDATA - A1 B

Wierd INSERT ... SELECT syntax problem

2008-09-05 Thread Dan Tappin
I have an existing data set - here is an example (the real one is more complex than this) LOC DATA - A 1 B 2 C 3 D 4 E 5 F 6 ... and I am looking to run some sort of INSERT ... SELECT on this to make a new table like this: LOC

Re: SELECT question - query for records over a series of dates

2005-08-17 Thread Dan Tappin
I think you might be one to something here... is there such a thing as a while loop in MySQL? i.e. can I fill a table with data via a MySQL query? I guess I could do it via PHP... I could create a temp table with one column of dates for the range I am looking for and then LEFT JOIN my

SELECT question - query for records over a series of dates

2005-08-16 Thread Dan Tappin
I have a table full of data... a log of sorts. Each row has a timestamp. I want to generate some reports based on this data. For example I want a COUNT(*) of the rows for each day for the past week, 30 days, 12 months etc. I have no problem generating the query but I am stuck on a

Re: Linux vs. Windows?

2005-08-12 Thread Dan Tappin
I can't resist... neither Mac OS X! lol Dan T On Aug 12, 2005, at 8:46 AM, Brian Dunning wrote: Same machine, any performance difference? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Upgrade from 4.018 to 4.1.13 ?

2005-08-10 Thread Dan Tappin
Are you running the stock Apple MySQL install?? I went through this a few times. If so figure out where the default Apple install places the data dir. The MySQL pkg installers will install everything in: /usr/local/mysql/data/ where: /usr/local/mysql/ is really a symbolic link to each

Re: Persistent Corruption

2005-07-28 Thread Dan Tappin
I was running into this all the time. I actually had myisamchk running on a regular basis (live) via cron which I think was actually causing the corruption. By chance are you running myisamchk on the live tables?? I ran the REPAIR TABLE... on each table, shut down mysql THEN ran myisamchk

MATCH AGAINST with mixed MAX()

2005-07-28 Thread Dan Tappin
I have a table 'companies' and a table 'feedback'. Feedback has rows with a id_company key that matched the companies.id. Think of it as the ebay rating system. I have a simple query that works fine: SELECT companies.id, MIN(feedback.rating), MAX(feedback.rating),

Re: Innodb Questions

2005-07-24 Thread Dan Tappin
On Jul 24, 2005, at 9:13 AM, Michael Stassen wrote: Dan Tappin wrote (quotes from several posts, my thoughts interspersed): I am running into repeatable table corruption with MySQL 4.x on Mac OS X 10.x. Many people, myself included, are running mysql 4.x on OS X without reporting

Innodb Questions (was: Mac OS X Table Corruption)

2005-07-23 Thread Dan Tappin
-up the data dir manually. Any pointers would be appreciated. Thanks, Dan T On Jul 6, 2005, at 10:26 AM, [EMAIL PROTECTED] wrote: Dan Tappin [EMAIL PROTECTED] wrote on 07/06/2005 11:26:13 AM: I am running into repeatable table corruption with MySQL 4.x on Mac OS X 10.x. I previously had

Re: Innodb Questions (was: Mac OS X Table Corruption)

2005-07-23 Thread Dan Tappin
On Jul 23, 2005, at 10:14 AM, Ware Adams wrote: Has your mysql crashed or have your restarted the machine without first shutting down mysql manually? We only saw this error when mysql was not shut down normally. You can look in your .err file which should be in your data directory.

Re: Innodb Questions (was: Mac OS X Table Corruption)

2005-07-23 Thread Dan Tappin
On Jul 23, 2005, at 12:49 PM, Ware Adams wrote: Then I don't know what to say about the MyISAM error, though I'd watch InnoDB pretty carefully as I think MyISAM is pretty robust on OS X too. We did also see these when a disk is failing, but I assume you've run disk utility. I guess it

Re: Innodb Questions (was: Mac OS X Table Corruption)

2005-07-23 Thread Dan Tappin
X 10.2 system with the same issues and these files are not there so I'm guessing this is not likely the issue. Dan T On Jul 23, 2005, at 1:35 PM, Dan Tappin wrote: I was once asked about the shared libraies and if I had removed them. I cleared off the Apple 3.x build of MySQL but I'm

Mac OS X Table Corruption

2005-07-06 Thread Dan Tappin
I am running into repeatable table corruption with MySQL 4.x on Mac OS X 10.x. I previously had a MySQL install on 10.2 Client under 3.x and never had an issue or any major problems at all. I upgraded to MySQL 4.x and have subsequently installed MySQL 4.x (from the supplied pkg's) on my

Re: Mac OS X Table Corruption

2005-07-06 Thread Dan Tappin
the way. Could the dump and restore perhaps fix this? Can I still do it with out down grading? Dan T On Jul 6, 2005, at 9:26 AM, Dan Tappin wrote: I am running into repeatable table corruption with MySQL 4.x on Mac OS X 10.x. I previously had a MySQL install on 10.2 Client under 3.x

Re: Mac OS X Table Corruption

2005-07-06 Thread Dan Tappin
On Jul 6, 2005, at 10:26 AM, [EMAIL PROTECTED] wrote: I'm not a Mac guru but what you describe sounds like file system corruption. Can you do a diagnostic scan of your hard drives looking for bad sectors? You can move your data to another portion of the disk if you run an ALTER TABLE to

OS X and MySQL table corruption...

2005-04-04 Thread Dan Tappin
am convinced either I am unlucky and have some obscure issues on both systems or there is some issue with MySQL 4.x on OS X or a conflict somewhere with the older Apple versions supplied with the OS. Thanks, Dan T -- Dan Tappin, P.Eng. - Senior Engineer

Re: long PHP mysql_connect times

2005-03-18 Thread Dan Tappin
On Mar 18, 2005, at 4:16 AM, Daniel Hawker wrote: Curiouser and curiouser said Alice... When you say *it seems to be the first connect* do you mean in a page, ie the first connect/disconnect takes ages but then any subsequent connects are fine) Exactly. If I use pconnect the first one takes on

Re: long PHP mysql_connect times [Resolved]

2005-03-18 Thread Dan Tappin
Thanks Jeremy! It was the lack of a reverse DNS entry. I had the host resolved to an IP but now reverse arpa entry. I added the DNS PTR record and viola! I would have never though of / figured that one out. Dan T On Mar 18, 2005, at 10:59 AM, Jeremy Cole wrote: Restating apache resets the

long PHP mysql_connect times

2005-03-17 Thread Dan Tappin
I'm not sure if it's a OS X, PHP or MySQL issue so I apologize in advance if this is taken as too off topic. I have a PHP5.x site under development with MySQL 4.1.10. I had the site running fine and there were no speed issues at all. Everything is on the same system (a dual G5 Xserve).

[ERROR] Got error 127 when reading table

2005-02-21 Thread Dan Tappin
I had a previously stable 4.1.8-standard MYSQL install on OS X 10.3.x Server using the binaries supplied by MySQL. Recently I have had multiple corruption issues with a database on multiple tables. I keep getting [ERROR] Got error 127 when reading table when trying to write to an effected

Table crash questions...

2005-02-16 Thread Dan Tappin
I have MySQL 4.1.8 installed on OS X 10.3.8 Server and I was in the process of building a PHP / MySQL website. After numerous connection issues with the MySQL server I decided to take a look at the status of my tables to check for corruption. After running myisamchk I managed to loose all my

Re: Table crash questions...

2005-02-16 Thread Dan Tappin
wrote: Dan Tappin wrote: I have MySQL 4.1.8 installed on OS X 10.3.8 Server and I was in the process of building a PHP / MySQL website. After numerous connection issues with the MySQL server I decided to take a look at the status of my tables to check for corruption. After running myisamchk I

RE: Custom Auto-Increment Problem

2004-09-22 Thread Dan Tappin
] Behalf Of Harald Fuchs Sent: Wednesday, September 22, 2004 3:24 AM To: [EMAIL PROTECTED] Subject: Re: Custom Auto-Increment Problem In article [EMAIL PROTECTED], Dan Tappin [EMAIL PROTECTED] writes: Hi Shawn, First off thanks for the tip. I had read that page once already but after

RE: Custom Auto-Increment Problem

2004-09-22 Thread Dan Tappin
-Original Message- From: Harald Fuchs Sent: Wednesday, September 22, 2004 9:39 AM To: [EMAIL PROTECTED] Subject: Re: Custom Auto-Increment Problem The only difference is when you delete rows inbetween. In this case id_calc will be less than id. I stand corrected. Yes it can be

Custom Auto-Increment Problem

2004-09-21 Thread Dan Tappin
I am trying to create a table (projects) with the following basic column structure: id (primary key) id_client id_clientkey The ideas is that I will fill it with data like this: table: projects id id_client id_clientkey - 1 1 1 2

RE: Custom Auto-Increment Problem

2004-09-21 Thread Dan Tappin
Hi Shawn, First off thanks for the tip. I had read that page once already but after reading twice again after your post I realized that the answer was right there. Wrapping that concept around my brain really hurt but I get it now. I had this: CREATE TABLE projects ( id int auto_increment,

Crazy SELECT SUM ... JOIN ... GROUP problem

2003-03-03 Thread Dan Tappin
I have a complex JOIN statement that I can't seem to get to work. Here is my schema... I have a 'forsale' table with various colunms. Here is the query for the data I am interested in: SELECT id, clientid, price FROM forsale WHERE user_id = 152

Re: Crazy SELECT SUM ... JOIN ... GROUP problem

2003-03-03 Thread Dan Tappin
by clientid for both SUM(forsale_log.id) and SUM(forsale.price). It's a bit gross but I am only expecting a hand full of rows returned on each select. Thanks, Dan On Monday, March 3, 2003, at 08:11 AM, Bruce Feist wrote: Dan Tappin wrote: I am sure I just have the wrong JOIN structure but I can't

Crazy SELECT SUM ... JOIN ... GROUP problem

2003-03-01 Thread Dan Tappin
Oops... forgot the subject line... I have a complex JOIN statement that I can't seem to get to work. Here is my schema... I have a 'forsale' table with various colunms. Here is the query for the data I am interested in: SELECT id, clientid, price FROM forsale WHERE user_id = 152

Generating an automatic e-mail via MySQL

2003-02-12 Thread Dan Tappin
Does any one have a suggestion on running a daily / weekly e-mail notification based on results from a MySQL query? I have a table with date sensitive rows. The idea that as rows become stale (they were created / updated more than a week or month ago) the owner of the row is sent an e-mail

Strange PHP + MySQL add / update issue with NULL values

2002-08-17 Thread Dan Tappin
I have a table where I have specified several columns which I have specified that NULL values are not allowed. I have created a PHP based create / update / delete page where users can update the table. I have an INSERT script that takes the user input and generates the following query

Re: [PHP] RE: Strange PHP + MySQL add / update issue with NULLvalues

2002-08-17 Thread Dan Tappin
NULL This is strange... All of my NOT NULL columns result in '' data instead of NULL but colunms that do not have a NOT NULL constraint do result in NULL! Dan Try this instead: INSERT INTO table SET required_field = -Original Message- From: Dan Tappin [mailto:[EMAIL

Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-28 Thread Dan Tappin
also sort by. I hope this helps somebody. Dan At 13:43 -0700 3/26/02, Dan Tappin wrote: This is a follow-up to a MySQL keyword text search question I had answer a few days ago. I have table 'main' which has two INT columns 'maincat' and 'subcat' which hold an index number from to other

Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-27 Thread Dan Tappin
as my results. I am not sure if this is more work than it is worth. I don't want to duplicate data but I am thinking of just adding a 'maincatname' and 'subcatname' columns to my 'main' table and update them from the related tables. Thanks for your help, Dan At 13:43 -0700 3/26/02, Dan Tappin

[Newbie] MATCH and INDEX question (using a JOIN in a MATCHstatement)

2002-03-26 Thread Dan Tappin
This is a follow-up to a MySQL keyword text search question I had answer a few days ago. I have table 'main' which has two INT columns 'maincat' and 'subcat' which hold an index number from to other tables maincat and subcat. These table each hold descriptive names ('name') for each of the main

Re: Dumb Newbie Keyword Search Question

2002-03-25 Thread Dan Tappin
Thanks Alec, That is exactly what I was looking for. Dan I think what you want is a FULLTEXT index with the MATCH operator - see http://www.mysql.com/doc/F/u/Fulltext_Search.html . Particularl.y, see the new developments in fulltext in V4.0.1 half way doen the page Alec Cawley

Dumb Newbie Keyword Search Question

2002-03-24 Thread Dan Tappin
I have been looking through the mailing list archives but I can seem to find a straight forward answer anywhere. I have a MySQL table with a variety of text columns I would like to search. Pretty basic... A web search form returning the users input $keywords. Some type of relevance system would

Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
I have some experience with MySQL on MacOS X but that was with a pretty GUI installer. I am now trying to get MySQL installed on Redhat 7.0. I download the client and server versions and followed the install procedures. The problem I am having is with mysqladmin. The docs state that you need

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
get a secure connection refused message. Thanks, Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams Sent: Friday, November 09, 2001 2:10 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Newbie MySQL Install Question Dan

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
server has been started. - Original Message - From: Dan Tappin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 09, 2001 4:07 PM Subject: Newbie MySQL Install Question I have some experience with MySQL on MacOS X but that was with a pretty GUI installer. I am now

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
Port 3306 is open on the machine. Dan -Original Message- From: Kelley Reynolds [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 2:07 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Newbie MySQL Install Question Make sure that the mysql server has been

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
DOH! :^) Thanks for the tips. Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams Sent: Friday, November 09, 2001 2:26 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Newbie MySQL Install Question Dan Tappin wrote

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams Sent: Friday, November 09, 2001 2:26 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Newbie MySQL Install Question Dan Tappin wrote: I tried that but it came back with a 'mysqld is running already' error. Actually your

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Newbie MySQL Install Question Dan Tappin wrote: Ok that worked... but now my SQL utility program returns a 'Host 192.168.0.74 (my local IP) is not allowed to connect to this MySQL server' I assume that I need to get into the grant