【发布时间】:2010-05-22 15:01:35
【问题描述】:
我正在开发一个分类广告系统。
人们可以将照片添加到分类中,但我在显示分类列表时只显示一张。
为此,我有一个分类信息和照片之间的链接表,其中有一个“is_main”布尔字段。
当有人删除他们的一张机密照片时,我想:
1) See if there is more than that photo tied to the classified.
2) If there is, update the next photo and set that "is_main" field to TRUE.
只是想找出最有效的方法来做到这一点。
【问题讨论】:
标签: mysql codeigniter