Welcome Guest, Not a member yet? Register   Sign In
Help with Mysql Query - Subindex_string + group_concat
#10

@tektion,

Try it this way instead (remove the extra comma in the second where statement):
Code:
$Array = $MyModel
   ->where('Column3 !=', 0)
   ->where('SUBSTRING_INDEX(GROUP_CONCAT(GROUP))',1)
   ->orderBy('date', 'DESC')
   ->groupBy('GROUP')
   ->limit(2)
   ->find();
Reply


Messages In This Thread
RE: Help with Mysql Query - Subindex_string + group_concat - by php_rocs - 05-07-2021, 08:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB