2012/05/25 10:07 -0500, Andrés Tello
You have a typical hierarchical data issue, can be solved with a graph.
Theory review: http://www.algorithmist.com/index.php/Graph_data_structures
Mysql and PHP implementation:
http://www.phpro.org/tutorials/Managing-Hierarchical-Data-with-PHP-and-My
I am hoping someone can bail me out on why this query in not working.
In the queries below:
query 1 returns multiple rows - one per client.
in the rows where:
client_id is 254240, dr_all_ther_qty = 1
client_id is 253821, dr_all_ther_qty = 1
client_id is 254023, dr_all_ther_qty = 6
But when I
On 2012-05-25 8:35 AM, h...@tbbs.net wrote:
2012/05/25 14:57 +0700, HaidarPesebe
id | name | parentid
--
1 | cat A | 0
2 | cat B | 0
3 | subcat A | 1
4 | subcat A | 1
5 | subncat B | 2
-
I want to display the result like this:
1. Cat
You have a typical hierarchical data issue, can be solved with a graph.
Theory review: http://www.algorithmist.com/index.php/Graph_data_structures
Mysql and PHP implementation:
http://www.phpro.org/tutorials/Managing-Hierarchical-Data-with-PHP-and-MySQL.html
2012/05/25 14:57 +0700, HaidarPesebe
id | name | parentid
--
1 | cat A | 0
2 | cat B | 0
3 | subcat A | 1
4 | subcat A | 1
5 | subncat B | 2
-
I want to display the result like this:
1. Cat A
- Subcat A
- Subcat A
2. Ca
ta for MySQL
> is now available.
>
>
> For more information, see http://www.upscene.com/**
> displaynews.php?item=20120525<http://www.upscene.com/displaynews.php?item=20120525>
>
>
> With regards,
>
> Martijn Tonies
>
> Upscene Productions
> http://www
s.php?item=20120525
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql
I have a database for the category
id | name | parentid
--
1 | cat A | 0
2 | cat B | 0
3 | subcat A | 1
4 | subcat A | 1
5 | subncat B | 2
-
I want to display the result like this:
1. Cat A
- Subcat A
- Subcat A
2. CatB
-