 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bojan Guest
|
Posted: Sun Jul 03, 2005 8:01 pm Post subject: Help with SQL Query (MySQL 4.0) |
|
|
Hello,
I am trying to made some kind of simple forum, but I have problem with one
SQL Select Query. Please note that I am using v4.0 of MySQL and that I can't
use sub-queries.
I have next tables in my simple database:
members
---------
id INT (AUTOINC/Index)
name CHAR
groups
------
id INT (AUTOINC/Index)
name CHAR
topics
------
id INT (AUTOINC/Index)
post_date DATETIME
group_id INT
title CHAR
posts
-----
id INT (AUTOINC/Index)
topic_id INT
member_id INT
first_post TINYINT
text VARCHAR
What I want, is to display next data in Grid:
Column 1: Group name
Column 2: Date of last changed TOPIC in Group
Column 3: Name of last changed TOPIC in Group
Column 4: Name of Member of last post in Group
Column 5: Number of Topics inside Group
Column 6: Number of Posts inside Group
I will really like to display this (if is possible) with using one query (no
matter how complicated is). I have try many things and all I have made is to
get 3 of 6 columns :(
Thanks for all help.
Bojan
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|