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
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,
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
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
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
, 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
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
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
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:
ok, here are the 3 tables i have that are related:
mysql desc poll_questions;
++-+--+-++--
--+
| Field | Type| Null | Key | Default| Extra
|
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
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
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:
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
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
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
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
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.,
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
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
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
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
'%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
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
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
,
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
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
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
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
:
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
)
--- 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
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
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
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
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
:
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
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
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
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,
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
, '%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
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
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
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
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
45 matches
Mail list logo