在mysql 5.5.46中有表,在5.6.28中有相同的表。我在mysql 5.5.46上备份数据库,然后在5.6.28上还原它。因此,表在两台服务器上具有相同的结构和相同的数据。insert into test(path,link,company,width,height,view_count)在mysql5.5.46上,该查询成功执行,create_date值为'0000
我的SQL查询:SELECT * ,COUNT(posts_id) as `view `FROM `post_view` JOIN posts ON post_view.posts_id = posts.id GROUP BY posts_id,我雄辩的Laravel: ->selectRaw('*, count(posts_id) as view