Closed philecom closed 5 years ago
Which database are you using postgres or mariadb? For primary key are you using autoincrement or sequence or uuid? Do you want to insert into table more then one independent tree structure?
@bartko-s I'm using MySQL(MariaDB) I'm using autoincrement as a primary key I'm currently inserting into one tree; but would be happy to know how to insert into multiple independent tree structure
Then:
$options = array(
'tableName' => 'vz0q4_users',
'idColumnName' => 'id',
'leftColumnName' => 'lft',
'rightColumnName' => 'rght',
'levelColumnName' => 'level',
'parentIdColumnName' => 'parent_id'
);
$tree = new NestedSet($options, $dbAdapter);
@bartko-s I got that part. what my issue is the content of "values" in the $data array
`$data = array( // values // id_column_name => uuid );
$rootNodeId = $tree->createRootNode($data); `
@bartko-s I dont know why you close this issue when the problem has not been solved
I've been trying to integrate this library into Joomla components. My actual struggle is; for an example taking the following code from the documentation:
` try { $data = array( // values // id_column_name => uuid );
what is going to be the values for this section
$data = array( // values // id_column_name => uuid );
if my database table has these columns
'tableName' => 'vz0q4_users', 'idColumnName' => 'id', 'sequenceName' => 'categories', 'scopeColumnName' => 'scope', 'leftColumnName' => 'lft', 'rightColumnName' => 'rght', 'levelColumnName' => 'level', 'parentIdColumnName' => 'parent_id'
Thank you.