Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correct Record Order
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00621635
Message ID:
00624669
Vues:
18
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform