Hi, I have a problem with the tree behaviour:
Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND NOT (`Category`.`id` = 3)' at line 1 [COREcake/libs/model/datasources/dbo_source.php, line 514] Code | Context $sql = "UPDATE `categories` AS `Category` SET `Category`.`lft` = `Category`.`lft` + 2 WHERE `Category`.`lft` >= AND NOT (`Category`.`id` = 3)" $error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND NOT (`Category`.`id` = 3)' at line 1" $out = null $out = null; if ($error) { trigger_error("<span style = \"color:Red;text- align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); DboSource::showQuery() - COREcake/libs/model/datasources/ dbo_source.php, line 514 DboSource::execute() - COREcake/libs/model/datasources/dbo_source.php, line 201 DboMysqlBase::update() - COREcake/libs/model/datasources/dbo/ dbo_mysql.php, line 125 Model::updateAll() - COREcake/libs/model/model.php, line 1636 TreeBehavior::__sync() - COREcake/libs/model/behaviors/tree.php, line 921 TreeBehavior::__sync() - COREcake/libs/model/behaviors/tree.php, line 909 TreeBehavior::_setParent() - COREcake/libs/model/behaviors/tree.php, line 821 TreeBehavior::afterSave() - COREcake/libs/model/behaviors/tree.php, line 89 ModelBehavior::dispatchMethod() - COREcake/libs/model/behavior.php, line 162 BehaviorCollection::trigger() - COREcake/libs/model/behavior.php, line 437 Model::save() - COREcake/libs/model/model.php, line 1244 CategoriesController::admin_add() - APP/controllers/ categories_controller.php, line 82 Object::dispatchMethod() - COREcake/libs/object.php, line 115 Dispatcher::_invoke() - COREcake/dispatcher.php, line 245 Dispatcher::dispatch() - COREcake/dispatcher.php, line 211 [main] - APP/webroot/index.php, line 88 Query: UPDATE `categories` AS `Category` SET `Category`.`lft` = `Category`.`lft` + 2 WHERE `Category`.`lft` >= AND NOT (`Category`.`id` = 3) Query: UPDATE `categories` AS `Category` SET `Category`.`rght` = `Category`.`rght` + 2 WHERE `Category`.`rght` >= AND NOT (`Category`.`id` = 3) The error is generated by the cakePHP code it seems,MYSQL Server version: 5.0.51a-3ubuntu5.1 doesnt seem to like that syntax - any ideas? Cheers, Q --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---