increment and chked... it didnt work... here is what i did...
I set id tag on auto increment and then chked... it didnt work
so i dropped all the table data...
i added a new entry called markup and it got saved without an issue .
Here entries.id=1 and entries.revision=0
I now edited my post and saved it again. No issues. Now entries.id=1
and entries.revision=1 and entry_revisions.id=0 and
entry_revisions.revision=0.
Next edit.. i am unable to save. but entries.id=1 and
entries.revision=2 and also the text gets updated in the
entries.content with every new edit and save
these are the errors
Warning (512): SQL Error: 1062: Duplicate entry '0' for key 1 [CORE
\cake\libs\model\datasources\dbo_source.php, line 525
Code | Context
$sql = "INSERT INTO `entry_revisions` (`title`, `content`, `access`,
`modified`, `user_id`, `ip`, `revision`, `accessed`) VALUES ('markup',
'=== This is a h3 ===\r\n\'\'\' this should be italic \'\'\'\r\n!!!
this should be bold !!!\r\n___this should be underlined___\r\n&&& this
should be pre &&&\r\n[[[ftp://foo.bar.com]]]\r\n[[[ftp://foo.bar.com|
not a real site]]]\r\n[[[how to do it]]] [[[howtodoit]]] [[[How To Do
It]]] \\\r\n[[[how_to_do_it]]] [[[howtodoit|How To Do It]]]\r\n* this\r
\n* should\r\n* be\r\n* a\r\n* list\r\n# this\r\n# should\r\n# be\r\n#
a\r\n# numbered list\r\nhello world!', 0, '2009-04-03 20:25:44', 0,
'127.0.0.1', 1, '0000-00-00 00:00:00')"
$error = "1062: Duplicate entry '0' for key 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() - CORE\cake\libs\model\datasources
\dbo_source.php, line 525
DboSource::execute() - CORE\cake\libs\model\datasources
\dbo_source.php, line 201
DboSource::create() - CORE\cake\libs\model\datasources\dbo_source.php,
line 585
Model::save() - CORE\cake\libs\model\model.php, line 1223
EntriesController::edit() - APP\controllers\entries_controller.php,
line 281
Object::dispatchMethod() - CORE\cake\libs\object.php, line 117
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 227
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
[main] - APP\webroot\index.php, line 88
Query: INSERT INTO `entry_revisions` (`title`, `content`, `access`,
`modified`, `user_id`, `ip`, `revision`, `accessed`) VALUES ('markup',
'=== This is a h3 ===\r\n\'\'\' this should be italic \'\'\'\r\n!!!
this should be bold !!!\r\n___this should be underlined___\r\n&&& this
should be pre &&&\r\n[[[ftp://foo.bar.com]]]\r\n[[[ftp://foo.bar.com|
not a real site]]]\r\n[[[how to do it]]] [[[howtodoit]]] [[[How To Do
It]]] \\\r\n[[[how_to_do_it]]] [[[howtodoit|How To Do It]]]\r\n* this\r
\n* should\r\n* be\r\n* a\r\n* list\r\n# this\r\n# should\r\n# be\r\n#
a\r\n# numbered list\r\nhello world!', 0, '2009-04-03 20:25:44', 0,
'127.0.0.1', 1, '0000-00-00 00:00:00')
Warning (2): Cannot modify header information - headers already sent
by (output started at C:\xampp\htdocs\cake\cake\basics.php
i think there is some mistake eaither in the
entries_revisions_controller or the database... I had created the db
excaltly as mentioned in the tutorial
thanks for the help....
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment