Chris,
>select count(distinct uid) as c
>from aptg_guides_restricted as r, aptg_guides as g
..
See the extensive notes on comma and SQL2003 joins at
http://dev.mysql.com/doc/refman/5.1/en/join.html.
Lose the comma join, make it a SQL2003 (explicit inner) join.
PB
-
At 15:56 +0200 25
At 11:10 -0500 25/4/06, gerald_clark wrote:
Yes. 3.23 was not correct in the order of precedence.
This has been answered many times here.
Sorry - I haven't been on the list all that long.
You need to change your comma join to an inner join.
Lovely! That's it - many thanks.
At 17:15 +0100 2
2006/4/25, Chris Sansom <[EMAIL PROTECTED]>:
> At 15:56 +0200 25/4/06, Barry wrote:
> >And you don't see any misdone queries when you echo them, right?
> >Hope you checked that.
>
> Hi Barry
>
> I was wrong about its being a PHP issue: it's
> definitely a MySQL error. I realised I hadn't
> handled
Chris Sansom wrote:
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's definitely a MySQL
error. I realised I hadn't handled the error in such a way that I
cou
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's
definitely a MySQL error. I realised I hadn't
handled the error in such a way that I could see
what it was, but
At 15:56 +0200 25/4/06, Barry wrote:
Updating is always such a bad idea ;P
Do you know: never touch a running system? ^_^
Hmmm...
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Yes, they look just fine - in any case they're unchanged from when it
wa
Chris Sansom schrieb:
As a relative newbie, and an almost total newbie to the use of left
joins, I'm aware that there's some difference in the way joins work
between MySQL 3.x and 5.x, but in my ignorance I can't figure out what
the heck it is from reading the 'upgrading' pages on dev.mysql.com
Asplund [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 1:26 PM
To: Chris Boget
Cc: [EMAIL PROTECTED]; MySQL
Subject: Re: Stumped on a query
On Tue, 20 Jan 2004, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4
On Tue, 20 Jan 2004, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > > table2.columnA = '3';
> > > table2.columnB = 'this';
> > > I need to write a query that will do something along these lines:
> > > SELECT * FROM table1,
On Tue, Jan 20, 2004 at 03:02:45PM -0600, Chris Boget wrote:
> > > The data I'm working with looks like this:
> > > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > > table2.columnA = '3';
> > > table2.columnB = 'this';
> > > I need to write a query that will do something along these lines:
> > > SE
> > The data I'm working with looks like this:
> > table1.columnA = '1;3;4;6;8;9;12;13;14;15';
> > table2.columnA = '3';
> > table2.columnB = 'this';
> > I need to write a query that will do something along these lines:
> > SELECT * FROM table1, table2 WHERE
> > table2.columnB = 'this'
> > AND
>
On Tue, 20 Jan 2004, Chris Boget wrote:
> The data I'm working with looks like this:
>
> table1.columnA = '1;3;4;6;8;9;12;13;14;15';
>
> table2.columnA = '3';
> table2.columnB = 'this';
>
> I need to write a query that will do something along these lines:
>
> SELECT * FROM table1, table2 WHERE
>
Patrick,
You need "outer joins" to do this. Try searching for "outer join sql
tutorial" on Google.
Hope this helps,
Andy
> -Original Message-
> From: Patrick Crowley [mailto:[EMAIL PROTECTED]
> Sent: 07 August 2003 16:51
> To: [EMAIL PROTECTED]
> Subject: STUMPED: How Can I Pull Relate
> Sounds as if your table is not normalized for that kind of query. If
> there are multiple directors id'd by multiple movies you could left
> outer join the movie.id with the director.id
>
> Make sense?
Actually, it's normalized beyond that.
Sometimes, movies have more than one director, so th
[snip]
Thanks, Jay and Andy! OUTER JOINS work great for part of my query.
But how would you modify this query to support multiple directors?
(That's
why I've got a movie_director table.)
Movie Name | Director A, Director B, etc. | 35 comments
Best,
Patrick
> SELECT foo
> FROM movie LEFT OU
Thanks, Jay and Andy! OUTER JOINS work great for part of my query.
But how would you modify this query to support multiple directors? (That's
why I've got a movie_director table.)
Movie Name | Director A, Director B, etc. | 35 comments
Best,
Patrick
> SELECT foo
> FROM movie LEFT OUTER JOI
> Sometimes, movies have more than one director, so the
> association between movies and directors needs to be in its
> own table, instead of the movies table. (Otherwise, you're
> limited to some fixed number of directors per
> film.)
>
> Directors may not be the best example. Think about prod
The comma after Gerlad R was a typo.
As for the 500 actors issue, I'm merely using the movie db as an example.
People always post the strangest db's to this list ("I have one table for
monkeys and one for fishes who speak Urdu, and I need..."), so I thought I'd
spare everyone the particulars of mi
[snip]
But here's where I'm stuck: for each film, I need to pull the movie info
in
'movies', plus any related data from other tables, like this:
The Lord of the Rings | Peter Jackson | 3 comments
Episode II| George Lucas | 0 comments
Indiana Jones | Steven
> I am changing a database and changing the user and password of an
> existing
> database. when I enter the line.
>
> mysql> insert into user (host, user, password) values ('localhost',
> 'newuser', password ('newpswrd'));
>
> the error 1062: Duplicate entry 'localhost-newuser' for key 1
> mysql>
Hi Ian,
1.What version of Linux use ?
2.Type "top" and you can see at least 4 mysqld processes.Is nothing bad.And
for every new connected client apear a new mysqld process.
Regards,
Gelu
_
G.NET SOFTWARE COMPANY
Permanent e-mail address : [EMAIL
On Fri, 26 Apr 2002 18:27:24 +1000
"Ian Phillips" <[EMAIL PROTECTED]> wrote:
>
> Thanks to Gelu for his patience: unfortunately his suggestion of
> Gelu> Go to /etc/init.d and type : ./mysql(d) restart
> didn't work for me, as I do not have init.d in /etc - I have searched for
> ti, but not ther
Many thanks. Problem is cured
- Original Message -
From: "Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]>
To: "Cory Whitesell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 4:26 PM
Subject: Re: Stumped
> > Thi
> This should be very simple, but for some reason, my query does not return the
>desired results
> I have the following two tables:
>
> CREATE TABLE Rank (
> Rank CHAR(40) NOT NULL PRIMARY KEY,
> ReportsTo CHAR(40) NULL
> );
>
> CREATE TABLE ROSTER (
> EntryNumber INTEGER NOT NULL AUTO_
24 matches
Mail list logo