[plug] Optimise MySQL query
Shannon Carver
shannon.carver at gmail.com
Wed Mar 29 11:15:38 WST 2006
Hi Nigel,
I've found the best way to learn SQL syntax is work out what you're trying
to do, give it a go at solving it, then query here or google or something.
By that I mean, often learning like this by working out how someone else's
query works is a good way of learning most of what you need to know.
I use the mysql online help for purely syntax related things (I have
problems remembering ALTER TABLE syntax for some reason :P), but I would
have mostly learned by following others examples to the point where I hope I
have an ample understanding of the language/syntax myself.
Shannon
-----Original Message-----
From: plug-bounces at plug.org.au [mailto:plug-bounces at plug.org.au] On Behalf
Of nigel at dubh.id.au
Sent: Wednesday, 29 March 2006 11:02 AM
To: plug at plug.org.au
Subject: Re: [plug] Optimise MySQL query
Hi Ryan,
On Wed, Mar 29, 2006 at 10:40:56AM +0800, Ryan King wrote:
>
> SELECT count(*), DATE_FORMAT(date, '%Y-%m') as month
> FROM $table
> WHERE user=$user
> GROUP BY month
Thanks, just what I needed.
I was hoping I wouldn't be the one that does the database work
but it looks like I am going to have learn it. Are there any good
books you would recommend on the subject or is the mysql
online documentation sufficient?
Thanks again.
Nigel
_______________________________________________
PLUG discussion list: plug at plug.org.au
http://www.plug.org.au/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au
More information about the plug
mailing list