problem with NestedSet & PostgreSQL
| From: | ma dot siebeneicher at gmx dot de | Date: | Sat, 28 Feb 2004 00:52:35 +0000 |
| Subject: | problem with NestedSet & PostgreSQL | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11005@lists.php.net to get a copy of this message | ||
hola,
i have some problems with my DB_NestedSet(version=1.2.4)... my current
system has:
php5b4
postgresql 7.4.1
i started to configure with NestedSet by creating my tables -> node_table
and lock_table, all fine... now i get an instance from
DB_NestedSet::factory, seems to be all great, but when i try to add a new
rootnode with method 'createRootNode' i get that error-code ->
1077933773.77::Debug:: createRootNode($values, $id = false, $first = false)
1077933773.77::Debug:: testLock()
1077933773.77::Debug:: _lockGC()
1077933773.81::Debug:: _setLock()
1077933773.87::Debug:: _testFatalAbort($errobj, $file, $line)
Fatal error: INSERT INTO web_handlanger.bookmark_locks SET
lockID='lck-403ff6cdca2a5', lockTable='web_handlanger.bookmark_nodes',
lockStamp=1077933773 [nativecode=ERROR: syntax error at or near "SET" at
character 43] (-2) in file /usr/local/lib/php/DB/NestedSet.php at line 1977
in /usr/local/lib/php/PEAR.php on line 758
1077933773.89::Debug:: _DB_NestedSet_DB()
1077933773.89::Debug:: _DB_NestedSet()
1077933773.89::Debug:: _releaseLock()
1077933773.91::Debug:: _db_Disconnect()
my script looks like:
$o_bookmarks = & DB_NestedSet::factory('DB', $o_config->common->dsn,
$nestedset_params);
$o_bookmarks->debug = TRUE;
$o_bookmarks->setAttr($nestedset_attributes);
$values = array('name' => 'msieb->bookmarks', 'url' =>
'', 'description' =>
'', 'is_bookmark' => 0);
$rn1 = $o_bookmarks->createRootNode($values = , $id = FALSE, $first =
FALSE);
and the params and attributes are set to:
<nestedset_params>
<bookmark_id>id</bookmark_id>
<root_id>rootid</root_id>
<l>l</l>
<r>r</r>
<bookmark_order>norder</bookmark_order>
<level>level</level>
<name>name</name>
<url>url</url>
<description>description</description>
<is_bookmark>is_bookmark</is_bookmark>
</nestedset_params>
<nestedset_attributes>
<node_table>web_handlanger.bookmark_nodes</node_table>
<lock_table>web_handlanger.bookmark_locks</lock_table>
</nestedset_attributes>
so, my english is pretty stifling, but i hope the scope was set to the right
points... the sql-statement seems to be very interesting, i never saw an
INSERT statement like 'INSERT INTO <table> SET key=val'... the postgresql
documentation told me nothing more about that notation than my
sql-experiance. i hope too could solve this problem with your help... maybe.
for alle notes and listeners: thank you!!
so, greetings and bye...
markus