2007-05-5
tattertools中间category显示错误的修复
发现了,确实是一个bug,你不信可以看你自己的源程序,错误是在这个函数。
getEntriesWithPagingByCategory
在文件blog\category\index.php里面
在那句sql里面你可以看到
$sql=”SELECT e.*, c.label AS categoryLabel
FROM {$database['prefix']}Entries AS e
LEFT JOIN {$database['prefix']}Categories c ON e.category = c.id
WHERE e.owner = $owner AND e.draft = 0 $visibility $cond
ORDER BY e.published DESC”;
这句话里面的joint有问题,应该是
LEFT JOIN {$database['prefix']}Categories c ON e.category = c.id AND e.owner = c.owner
必须加上e.owner = c.owner
你可以比较上面那个函数getEntryListWithPagingByCategory
就会发现这个错误,上面那个函数基本是一样的,一个只取了title,一个取了全部。
而getEntryListWithPagingByCategory是书写正确的。
如果你是个人博客,没有安装多人可能不会有这个错误存在,而我使用的是多人的,错误是存在的。
我的是tattertools 1.1.2.1版本,请大家查看。
终于错误消除了,送了一口气。写成函数容易看多了,和html混写,看起来真是会死人啊。
Related posts:
- Publish blog via email Now I am using my google account to send email...
- SQL fast tip 1. Get total rows of table: SELECT count(*) FROM <table_name>...
- Wordpress export problem, solution and instruction As you may aware, when your xml size is over...
![[del.icio.us]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/myspace.png)
![[Technorati]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/technorati.png)
![[Twitter]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://my.textjourney.com/eric/wp-content/plugins/bookmarkify/email.png)








