[Gllug] OT: MySQL : arrgh no subqueries
Ian Scott
mriscott at yahoo.co.uk
Wed Jul 9 11:40:14 UTC 2003
> SELECT Content.name, Groups.gid, Groups.groupname
> FROM Content.Groups
> WHERE Content.gid = Groups.gid;
> All works nicely,
> but,
> If an item in Content is owned by a Group that has been deleted from
> Groups
> then it is totally omitted in the above results,
> What i want is to return the Content.name of all the objects that were
> not
> listed from Content by the previous query,
> confused yet?
>
Lateral thoughts:
1)How about capturing the results from
select name,gid from Content;
select gid from groups;
and parsing the two with perl/shell/sinclair basic/whatever turns you on?
2) Don't delete groups. Have a isDeleted flag instead, so you get around this
problem in future.
Ian
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list