0
votes
0answers
24 views

how to traverse in parent child relationship database

I have mysql table this, I'm not able to post image here so its structure with data. CREATE TABLE IF NOT EXISTS `tree_relation` ( `tId` int(11) NOT NULL AUTO_INCREMENT, `t_up_aid` int(11) NOT ...
-1
votes
0answers
24 views

Performing MySQL depth first search

I'm looing for some information on how to perform a search in MySQL. I have a table of interconnected devices. See example table below. <table> <tr> ...
0
votes
2answers
75 views

Recursive function with <ul><li> [duplicate]

currently I am displaying data in Text format with recursive function like.. Food Fruit Red Apple Yellow Banana Meat Beef Pork ...
3
votes
1answer
110 views

PHP/MYSQL: Slowly iterate through 6k rows and for every row create new records - Algorithm

I'm sorry for stupid question, but I have one of these days, where I feel like the dumbest programmer. I need your help. I'm currently developing with PHP and MYSQL, where I'm like super low skilled ...
0
votes
1answer
67 views

php tree recursion using mySQL

I have the following code, and a huge ERROR : Maximum function nesting level of '100' reached, aborting!: function getTree($id) { $arr = array(); $sql ='select * from arboree where ...
0
votes
2answers
48 views

Get all leaf elemnts of a tree using mysql

This is my first post on this blog please help me I am trying to get all the last element from a recursive query but it is taking to much time to proceed is there a better way to do this what I ...
-1
votes
2answers
81 views

php :How to generate 2D array from mysql SELECT? [closed]

I have some questions , please help me. In PHP/MySQL I have a query that I want to generate 2D array, how can I do it ? I hava a php array code, like this: $menu = Array( // I wanna to get data ...
0
votes
2answers
72 views

How can I create a query that shows children of an item recursively [duplicate]

I have a MySQL table which has the following format: CREATE TABLE IF NOT EXISTS `Company` ( `CompanyId` INT UNSIGNED NOT NULL AUTO_INCREMENT , `Name` VARCHAR(45) NULL , `Address` VARCHAR(45) ...
-1
votes
1answer
81 views

PHP Function to build a tree starting from specific node [closed]

I have a table that represents agencies. Each agency may or not have a parent (fk_organismo). The agencies without parent (fk_organismo = NULL) are the root agencies. Could anyone help me with a ...
2
votes
2answers
119 views

Recursive MySQL Query with relational innoDB

I've got a table structure like (simplified): content - id_content - my_string1 - ... content_has_content - id_content - id_subcontent topic_has_content - id_topic - id_content ...
12
votes
2answers
508 views

SQL and Delphi: recursive mechanism for creating a tree from a table

The DBMS I'm working with is MySQL, the programming environment is Delphi 7 (which doesn't really matter for this example). I have a table called 'subject' where I store all book subjects in the ...
0
votes
1answer
341 views

Recursive category tree in php

I have this sql table How to return it with php like? Root1 - SubCat 1 -- SubSubCat 1 - SubCat 2 Root2 I found this, but i cant return it in form, that i need. But the script still displays all ...
1
vote
1answer
47 views

MySQL: Can Tables Be Locked Recursively?

Can MySQL (InnoDB) tables be locked recursively? Can't find any mention of nesting or recursion in the LOCK TABLES documentation. The default behavior seems to be (based on what I've observed) that ...
1
vote
1answer
41 views

How do I structure a bunch of items that chain together in a MySQL database?

I apologize for the vagueness of my question title, but I don't even know what to call what I'm trying to accomplish. The best way to describe what I want is that I want to be able to chain a bunch ...
0
votes
2answers
49 views

what can I do to optimize the following function or some other thing to reduce memory consumption?

I am working on business directory sort of thing, and need to show recursive parents of categories at category listing. I am using following function for that: public function ...

1 2 3 4 5 10
15 30 50 per page