Please help!

2001-01-31 Thread Daren Cotter
Someone please help me. This query has always worked until now, now all of a sudden I get a weird error: SELECT DISTINCT(signup_date), COUNT(*) AS count, CONCAT(SUBSTRING(MONTHNAME(signup_date),1,3), ' ', DAYOFMONTH(signup_date), ', ', YEAR(signup_date)) AS signup_date_display FROM members GROUP

Index Question

2001-03-01 Thread Daren Cotter
My question is about indexes...basically, I'm wondering how many indexes is too much, and what the drawbacks are of having more indexes on a table? I'm guessing INSERT and UPDATE queries probably take longer? My table has the following fields: member_id, first_name, last_name, username,

weird date behavior

2001-03-01 Thread Daren Cotter
I have a field in my table that stores the date a member has signed up...i run a query using distinct to show me how many members signup each day. Yesterday, our server crashed, and today i am seeing weird behavior with mysql: SELECT count(*) FROM members WHERE signup_date = now(); 122 SELECT

more date problems

2001-03-01 Thread Daren Cotter
okay, this is a follow-up to my past email... since I KNOW more than 122 people have signed up today, I did the following query: SELECT signup_date, member_id FROM members ORDER BY member_id DESC limit 200; there are at LEAST 200 people that have signed up today. however, when i do: SELECT

RE: more date problems

2001-03-01 Thread Daren Cotter
Quentin, that does not work either, I still get the 125 number, when there are actually 500 records =( I am using version 3.22.32 -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 4:18 PM To: 'Daren Cotter'; [EMAIL PROTECTED] Subject

RE: more date problems

2001-03-01 Thread Daren Cotter
, they show up fine. What's going on? =) -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 4:45 PM To: 'Daren Cotter'; [EMAIL PROTECTED] Subject: RE: more date problems Can you post some of the data - e.g the first 500 rows of the 'order

date troubles

2001-03-01 Thread Daren Cotter
I should note, however, that this query works FINE: mysql select count(*) from members where signup_date = '2001-02-28'; +--+ | count(*) | +--+ | 732 | +--+ This APPEARS to work, but the "127" should be more like 420 mysql select count(*) from members where

Error 2013

2001-03-12 Thread Daren Cotter
I recently moved to a new server, and successfully copied the database over to the new server. However, at least half of my queries are returning the error: ERROR 2013: Lost connection to MySQL server during query The error seems to be random, and only with longer queries. I'm guessing this is

Resolution

2001-03-12 Thread Daren Cotter
Since I posted so many times about my problem, I feel obligated to notify everyone I have resolved it, and exactly what was wrong. I have two fields: last_update, and last_login. Both fields are timestamps, with defaults of "000". My queries were doing things like:

very tough query

2002-03-05 Thread Daren Cotter
ok, here are the 3 tables i have that are related: mysql desc poll_questions; ++-+--+-++-- --+ | Field | Type| Null | Key | Default| Extra |

RE: very tough query

2002-03-05 Thread Daren Cotter
To: [EMAIL PROTECTED] Cc: Daren Cotter Subject: Re: very tough query Hi Darren, On Tue, 5 Mar 2002 09:42:50 -0800 Daren Cotter [EMAIL PROTECTED] wrote: mysql desc poll_questions; ++-+--+-++- ---+ | Field | Type

RE: [PHP] Re: A stupid question...

2002-03-10 Thread Daren Cotter
I would think the easiest way would be to use the string functions of MySQL itself...then you don't have the overhead of the PHP application having to check each row of data (a wise person on this board once answered a question similar to this for me). Somthing like... $query = SELECT * FROM

RE: Query syntax help

2002-03-21 Thread Daren Cotter
What you had looks fine except the date...change what you had to: AND date = '2002-03-17'; # date needs quotes around it Should work. -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 8:49 AM To: mysql list (choose midget) Subject:

Multiple Referral Levels

2002-09-25 Thread Daren Cotter
I have a question regarding tracking multiple referral levels in a database. The number of referral levels tracked needs to be at least 4, but should be able to be expanded later (without modifying the database). The first design I considered was: table: id int(8) unsigned not null

Nested query

2002-05-11 Thread Daren Cotter
I need to run a query that selects the usernames of all the members a particular member has referred on the second level. So member 5 refers 10, 11, and 12, I need the usernames of everyone referred by 10, 11, or 12. Currently I run one query to get 10, 11, 12, make that a string, then do another

Nested query

2002-05-11 Thread Daren Cotter
I need to run a query that selects the usernames of all the members a particular member has referred on the second level. So member 5 refers 10, 11, and 12, I need the usernames of everyone referred by 10, 11, or 12. Currently I run one query to get 10, 11, 12, make that a string, then do another

Query Problem

2002-05-31 Thread Daren Cotter
I am having major troubles creating this query...ok here's some background info: I have three tables: members, which contains info about the member, such as city, state, zip, marital status, etc; interests, which stores just an interest_id and name; and member_interests, which stores just

Query Help (more)

2002-05-31 Thread Daren Cotter
As a follow up to my previous question, two possible solutions came to mind: 1) Query members table for all members matching criteria stored in that table (country, marital status, income, etc). Then, take all those member_ids, and query member_interests table for members who match there. i.e.,

Left join?

2002-06-04 Thread Daren Cotter
I have the following tables: Member_interests: Member_id Interest_id Interests: Name Interest_id I need a query that selects each interest name, and the # of members who have selected it...sample output: Boating 25 Hiking 10 .. Swimming0 Jumping 0 Talking 0 The following query works

RE: Normalization question

2002-06-04 Thread Daren Cotter
this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 6:24 PM To: Daren Cotter Subject: Re: Normalization question Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass

More Query Help

2002-06-05 Thread Daren Cotter
First off, I would like to thank everyone on this lists who helps people like myself! I'm having trouble with the following query: SELECT username, first_name, email, DATE_FORMAT(signup_date, '%b %e, %Y') AS signup_date FROM members WHERE referer = (id) It selects a list of all members from the

More Query Help [more info]

2002-06-05 Thread Daren Cotter
I probably did not provide enough info the first time. The members table is setup as follows: Id (primary key) Referer (relates to the primary key of the table) I am given a member ID, say 4. I need to display all members who have been referred by member 4 (obviously no problem). However, for

normalization question

2001-08-18 Thread Daren Cotter
'%mail_id%' Is there any possible way I could accompish this task in one query if I had this process normalized? TIA, Daren Cotter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http

RE: normalization question

2001-08-19 Thread Daren Cotter
The data wouldn't need to be stored for any longer than two to three months, so that shouldn't be a problem...what about my query to get all members that have not read the mailing, is that possible (assuming I don't use the reverted logic you were talking about). Daren Cotter CEO

tough query

2001-08-30 Thread Daren Cotter
the members table to itself...can anyone help me out? i think this is somewhat close: select 1.member_id, count(*) as count from members as 1 left join members as 2 on 1.referer_id = 2.member_id where 2.first_name is not null; tia, Daren Cotter CEO, InboxDollars.com http://www.inboxdollars.com (507

very strange query behavior

2001-09-24 Thread Daren Cotter
, Sincerely, Daren Cotter CEO, InboxDollars.com [EMAIL PROTECTED] http://www.inboxdollars.com (507) 382-0435 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

RE: Query help...

2001-10-24 Thread Daren Cotter
one page to another. Hope that helped! Sincerely, Daren Cotter CEO, InboxDollars.com [EMAIL PROTECTED] http://www.inboxdollars.com (507) 382-0435 -Original Message- From: David Wolf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 2:17 PM To: Steve Meyers; [EMAIL PROTECTED

weird error

2001-10-31 Thread Daren Cotter
has anyone ever seen this MySQL error? The database has a high-traffic table with about a million rows, is this the problem? Warning: MySQL: Unable to save result set TIA, Sincerely, Daren Cotter CEO, InboxDollars.com [EMAIL PROTECTED] http://www.inboxdollars.com (507) 382-0435

Help with Query

2003-03-17 Thread Daren Cotter
I have a table that keeps track of when members of my site are mailed. The important fields in the table are: member_id, mail_id I need to write a query that will return the # of members and # of mailings, like the table below: # of mailings sent # of members

Re: Help with Query

2003-03-17 Thread Daren Cotter
: SELECT mail_id, count(member_id) AS `# of members` FROM yourtable GROUP BY mail_id; At 18:44 -0800 3/17/03, Daren Cotter wrote: I have a table that keeps track of when members of my site are mailed. The important fields in the table are: member_id, mail_id I need to write a query

Re: Help with Query

2003-03-17 Thread Daren Cotter
) --- Zak Greant [EMAIL PROTECTED] wrote: On Mon, Mar 17, 2003 at 09:52:44PM -0800, Daren Cotter wrote: Jeff, That query simply gives me each mailing ID, along with the # of members associated with that mailing ID. What I NEED is to return the # of mailings sent to a member

Re: Help with Query

2003-03-19 Thread Daren Cotter
Thanks, this works great in the MySQL server...I guess I've never used temp tables before, but when I try to run this in a PHP script, I get table does not exist. How do I do this? --- Harald Fuchs [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Daren Cotter [EMAIL PROTECTED] writes

Impossible Query?

2002-07-11 Thread Daren Cotter
I have three tables, affiliates, clients, and sales. The affiliates table stores all of the information about affiliates, clients about clients, sales about sales. In the clients table, there is a field for affiliate_id (affiliates refer clients), and in the sales table there is a field for

Impossible Query?

2002-07-11 Thread Daren Cotter
I have three tables, affiliates, clients, and sales. The affiliates table stores all of the information about affiliates, clients about clients, sales about sales. In the clients table, there is a field for affiliate_id (affiliates refer clients), and in the sales table there is a field for

Data Directory

2002-08-14 Thread Daren Cotter
My Linux installation only has about 1gb in the /var partition, so I need to relocate my databases to the /home partition. I'm pretty sure the following commands will shutdown mysql, move the data directory, create a symbolic link, and then restart mysql. My question is, is this complete, or do I

Re: Data Directory

2002-08-14 Thread Daren Cotter
: Daren Cotter wrote: My Linux installation only has about 1gb in the /var partition, so I need to relocate my databases to the /home partition. I'm pretty sure the following commands will shutdown mysql, move the data directory, create a symbolic link, and then restart mysql. I think

Re: Load Data Infile

2002-08-20 Thread Daren Cotter
I would use some sort of scripting language (PHP for example) to format the date, and have that script import the data into your table, rather than using LOAD DATA INFILE. If you post a sample of how your data file is formatted, someone will gladly help you out. You might want to post this to

indexing question

2001-11-21 Thread Daren Cotter
space? Sincerely, Daren Cotter CEO, InboxDollars.com [EMAIL PROTECTED] http://www.inboxdollars.com (507) 382-0435 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

Data File

2001-03-29 Thread Daren Cotter
I have a query I'm sending to the DB...however, instead of having the server send me the data back, I want to put it into a CSV file for use in an Excel Spreadsheet. This means either tab-delimited, or separated by commas. Can someone help? Thanks,

Referer Count

2001-04-22 Thread Daren Cotter
with one query? If I want to get the top 100 referers' data, I don't want to do 100 separate queries. Please help! Thanks, Daren Cotter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http

RE: Referer Count

2001-04-22 Thread Daren Cotter
, '%b %e, %Y') AS signup_date FROM members AS a, members AS b WHERE a.active_member = 'Y' AND a.ref1 = b.member_i d GROUP BY a.ref1 ORDER BY count DESC LIMIT 20; Daren Cotter CEO, InboxDollars.com http://www.inboxdollars.com (507) 382-0435 -Original Message- From: Paul DuBois [mailto:[EMAIL

Query Question

2001-04-30 Thread Daren Cotter
which format would be better for the server, assuming there are upwards of 10,000 member_ids, whether it be one of these solutions or another one. TIA, Daren Cotter - Before posting, please check: http://www.mysql.com

Query Help

2001-06-05 Thread Daren Cotter
subdomain.domain.com. If anyone could help me out with this query, I'd really appreciate it. TIA, Daren Cotter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

tough query

2001-06-30 Thread Daren Cotter
of and...this produces invalid results. someone help please! =) TIA, Daren Cotter - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e

Left Join Query

2001-08-03 Thread Daren Cotter
BY ad.affiliate_id ORDER BY count DESC Note, I want to return all affiliates, even if there are no matching rows in the advertisers table, which is why I'm assuming a left join is necessary. TIA, Daren Cotter - Before posting