sql problem

2004-09-08 Thread Dean A. Hoover
,parent.name,COUNT(child.parent_id) FROM PARENT INNER JOIN CHILD ON parent.id=child.parent_id GROUP BY parent.id; Any ideas? Thanks. Dean Hoover -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: sql problem

2004-09-08 Thread Dean A. Hoover
: SELECT parent.id,parent.name,COUNT(child.parent_id) FROM PARENT INNER JOIN CHILD ON parent.id=child.parent_id GROUP BY parent.id; Any ideas? Thanks. Dean Hoover This is untested, but I've used this same technique for a similar problem. The only part that I am unsure of is using COUNT inside

can't drop database: ERROR 1217

2004-05-14 Thread Dean A. Hoover
version: mysql Ver 12.22 Distrib 4.0.18, for pc-linux (i686) mysql DROP DATABASE xxx; ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails what is this all about? how the heck can I drop the database? Dean Hoover -- MySQL General Mailing List For list archives

sub select equivalent

2003-12-12 Thread Dean A. Hoover
I am using version 3.23.58 and need to do the following: select * from a where id not in (select tbl_id from b where tbl=a); Given that my version does not support sub selects, how can I re-write the statement to get the desired results? Thanks. Dean Hoover -- MySQL General Mailing List For list

off into the weeds

2003-11-28 Thread Dean A. Hoover
I aborted it. It seems like it should have returned almost immediately. Can anyone point out the error of my ways? mysql select list_rank.category_id,entry.id,entry.title from list_rank,entry order by entry.title; Thanks. Dean Hoover -- MySQL General Mailing List For list archives: http