Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct Record Order
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00621635
Message ID:
00624669
Views:
12
Hi,

Did you try switching the thread and the thread_parent? Like:

...ORDER BY thread_parent,thread,...

HTH,
Arriyel

>Hi Everyone.
>
>I've got a unique problem. I'm working on a message board app for my company's intranet. I'm using ASP with foxpro databases and SQL statements. I have a tree which displays the messages just like UT and other sites. My problem is this, I can populate the tree with messages and replys, but the replys do not fall under the correct parent. Here's my SQL statement, and a sample of what I'm talking about.
>
>SELECT * FROM threads ORDER BY thread,thread_parent,thread_level
>
>Wrong order displays:
>
>1rst Message
> - Reply1
> - Reply2
> - Reply3
> - Reply to Reply2
>
>Correct order would display:
>
>1rst Message
> - Reply1
> - Reply2
> - Reply to Reply2
> - Reply3
>
>Fields:
>Thread..............|.Thread_Parent.. | MessageID
>2002049105517 | 2002049105517 | 2002049105517
>2002049105517 | 2002049105517 | 2002049105558
>2002049105517 | 2002049105558 | 2002049105622
>2002049105517 | 2002049105558 | 2002049105703
>2002049105517 | 2002049105622 | 2002049105802
Speak using soft and sweet words in case you have to eat them later.
Previous
Reply
Map
View

Click here to load this message in the networking platform