分页展示30条数据,却出来老多数据???
发布时间:2023年12月28日
问题1:一开始我在页面上写了一个分页,只展示30条数据


但是展示了很多数据
问题所在:
因为我循环套循环,list数据和customer相乘(所以分页出现老多数据。)

问题2:(实际上是可以直接调用的,但是一开始调用符号整错了,以为是没有在模板里面关联这张表。。。)
下面是把这个关联的表加进去的过程:
回到原来的问题,如果我去掉customers的循环,用户就未定义用不了



用with将customer的数据加进去

因为要在list里面用所以要在这里面加

这个样子调用它
那个模板他原本就是有写的
应为一开始我用的 . 去调用的所以报错找不到customer
这是两张表关联要用(->)这个
文章来源:https://blog.csdn.net/Mmj_mmj/article/details/135277580
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:chenni525@qq.com进行投诉反馈,一经查实,立即删除!