返回列表 回复 发帖
我照教程来做,出现这样的错误!!!

exception 'FLEA_Db_Exception_SqlQuery' with message 'SQL 错误消息: "Data too long for column 'nicker' at row 1"
SQL 语句: "INSERT INTO `guestbook` (`nicker`, `email`, `url`, `content`, `created`) VALUES ('士大夫夺', '大师傅', '地方税', '地方税', '2007-03-06 12:44:29')"
SQL 错误代码: "7335941".' in D:\AppServ\www\GD\FLEA\Db\Driver\Mysql.php:576

#0 D:\AppServ\www\GD\FLEA\Db\Driver\Mysql.php(158): FLEA_Db_Driver_Mysql->_query('INSERT INTO `gu...', true)
#1 D:\AppServ\www\GD\FLEA\Db\TableDataGateway.php(944): FLEA_Db_Driver_Mysql->execute('INSERT INTO `gu...')
#2 D:\AppServ\www\GD\Guestbook\Controller\Default.php(39): FLEA_Db_TableDataGateway->create(Array)
#3 D:\AppServ\www\GD\FLEA\Dispatcher\Simple.php(80): Controller_Default->actionCreate()
#4 D:\AppServ\www\GD\FLEA\Dispatcher\Simple.php(49): FLEA_Dispatcher_Simple->_executeAction('Default', 'create', 'Controller_Defa...')
#5 D:\AppServ\www\GD\FLEA\FLEA.php(240): FLEA_Dispatcher_Simple->dispatching(Array)
#6 D:\AppServ\www\GD\Guestbook\index.php(18): run()
#7 {main}
nicker 字段太小,设为 varchar(128) 试试看
多谢!!!!!!!!!!!!!!

[ 本帖最后由 sn00py 于 2007-4-6 13:10 编辑 ]
呵呵  这算得上是FleaPHP的"hello world" 了
支持,辛苦
留言列表
昵称:
Notice: Use of undefined constant nicker - assumed 'nicker' in c:\program files\easyphp1-8\www\guestbook\View\index.php on line 110
test
邮箱:
Notice: Use of undefined constant email - assumed 'email' in c:\program files\easyphp1-8\www\guestbook\View\index.php on line 111
test@163.com
网站:
Notice: Use of undefined constant url - assumed 'url' in c:\program files\easyphp1-8\www\guestbook\View\index.php on line 112
http://test.cn
留言:
Notice: Use of undefined constant content - assumed 'content' in c:\program files\easyphp1-8\www\guestbook\View\index.php on line 115
test content!

test content!
原帖由 bluespray 于 2007-5-2 10:13 发表
留言列表昵称:
Notice: Use of undefined constant nicker - assumed 'nicker' in c:\program files\easyphp1-8\www\guestbook\View\index.php on line 110
test邮箱:
Notice: Use of undefined constant email - as ...
view下面index.php改下.    给key加引号
  1. <td class="td1-style">昵称:</td><td class="td2-style"><?=$gb['nicker']?></td>
  2.                 <td class="td1-style">邮箱:</td><td class="td2-style"><?=$gb['email']?></td>
  3.                 <td class="td1-style">网站:</td><td class="td2-style"><?=$gb['url']?></td>
  4.             </tr>
  5.             <tr>
  6.                 <td class="td1-style">留言:</td><td class="td3-style" colspan="5"><?=$gb['content']?></td>
复制代码
exception 'FLEA_Exception_ValidationFailed' with message '下列数据验证失败: "nicker, content".' in D:\usr\www\gbook\FLEA\Db\TableDataGateway.php:903

#0 D:\usr\www\gbook\Controller\Default.php(39): FLEA_Db_TableDataGateway->create(NULL)
#1 D:\usr\www\gbook\FLEA\Dispatcher\Simple.php(80): Controller_Default->actionCreate()
#2 D:\usr\www\gbook\FLEA\Dispatcher\Simple.php(49): FLEA_Dispatcher_Simple->_executeAction('Default', 'create', 'Controller_Defa...')
#3 D:\usr\www\gbook\FLEA\FLEA.php(240): FLEA_Dispatcher_Simple->dispatching(Array)
#4 D:\usr\www\gbook\index.php(18): run()
#5 {main}
什么问题呢
已经OK 不错
今天刚用了一下 不错~学习
返回列表