简体   繁体   English

将countif mysql查询表显示为html

[英]Show countif mysql query table to html

I have a countif query in mysql and I would like to show the table on my html.我在 mysql 中有一个 countif 查询,我想在我的 html 上显示该表。 I'm currently using laravel 6.0 framework.我目前正在使用 laravel 6.0 框架。

Here is the picture of the table i want to show:这是我要展示的表的图片:

这是我想展示的桌子图片

Here is my code in html:这是我的 html 代码:

这是我的 html 代码

Here is my code in the controller:这是我在控制器中的代码:

这是我在控制器中的代码

There should be numerous errors with index function in your controller.您的控制器中的index功能应该有很多错误。 Specifically with how you are trying to assign $count a value.特别是您如何尝试为$count分配值。 Read these: Eloquent Methods all() vs get() , Eloquent Selects , Eloquent Ordering, Grouping, Limit and Offset , Eloquent Where .阅读这些: Eloquent Methods all() vs get()Eloquent SelectsEloquent Ordering,Grouping,Limit and OffsetEloquent Where

Laravel has an excellent documentation, if you were to follow it - working with Laravel would become much easier. Laravel 有一个很好的文档,如果你遵循它 - 使用 Laravel 会变得容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM