<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Php  Group by problem.]]></title><description><![CDATA[<p dir="auto">I have a database table and I want to retrieve table data by grouping two  columns , I checked this but I was not able to find a solution ? Is there any method to do this.  I want to do this from php side , not mysql</p>
<p dir="auto"><img src="/assets/uploads/files/1600348618856-36043e19-3b5c-41c8-940f-eaa59bbfb19b-image.png" alt="36043e19-3b5c-41c8-940f-eaa59bbfb19b-image.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://lankadevelopers.lk/topic/700/php-group-by-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 20:13:13 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/700.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Sep 2020 13:18:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Php  Group by problem. on Sun, 20 Sep 2020 05:29:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks all</p>
]]></description><link>https://lankadevelopers.lk/post/3931</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3931</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Sun, 20 Sep 2020 05:29:24 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Fri, 18 Sep 2020 21:28:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/8">@Nubelle</a></p>
<p dir="auto">Ohh great bro, i'm very happy to help you.</p>
]]></description><link>https://lankadevelopers.lk/post/3928</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3928</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Fri, 18 Sep 2020 21:28:52 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Fri, 18 Sep 2020 17:23:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> hi root this is working , Thanks <img src="/assets/uploads/files/1600449823839-269f1ebd-04d9-4dbd-a514-ba4a789aebb4-image.png" alt="269f1ebd-04d9-4dbd-a514-ba4a789aebb4-image.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://lankadevelopers.lk/post/3926</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3926</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Fri, 18 Sep 2020 17:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Fri, 18 Sep 2020 06:41:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> Thanks , let me try this</p>
]]></description><link>https://lankadevelopers.lk/post/3925</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3925</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Fri, 18 Sep 2020 06:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Fri, 18 Sep 2020 06:41:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/922">@KrissSachintha</a> No when I add groupBy function mysql said to disable some features , when I disable them other functions not working</p>
]]></description><link>https://lankadevelopers.lk/post/3924</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3924</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Fri, 18 Sep 2020 06:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Fri, 18 Sep 2020 06:41:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/2">@dev_lak</a> No when I add groupBy function mysql said to disable some features , when I disable them other functions not working</p>
]]></description><link>https://lankadevelopers.lk/post/3923</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3923</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Fri, 18 Sep 2020 06:41:13 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 20:45:42 GMT]]></title><description><![CDATA[<pre><code>$array = [];

//$table_data is mysql returned array, you can change this whatever you want
foreach($table_data as $row) {
    $key = $row['type'] . '-' . $row['year'];
    if (!isset($array[$key])) {
        $array[$key] = $row;
    }
}

</code></pre>
<p dir="auto">Try with this , i think this is correct solution for your issue.</p>
]]></description><link>https://lankadevelopers.lk/post/3922</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3922</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Thu, 17 Sep 2020 20:45:42 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 18:07:47 GMT]]></title><description><![CDATA[<p dir="auto">Did group by year,type throwed an error?</p>
]]></description><link>https://lankadevelopers.lk/post/3921</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3921</guid><dc:creator><![CDATA[KrissSachintha]]></dc:creator><pubDate>Thu, 17 Sep 2020 18:07:47 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 17:29:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/8">@Nubelle</a> did you get any error?</p>
]]></description><link>https://lankadevelopers.lk/post/3919</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3919</guid><dc:creator><![CDATA[dev_lak]]></dc:creator><pubDate>Thu, 17 Sep 2020 17:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 13:38:42 GMT]]></title><description><![CDATA[<p dir="auto">Okay i'll try to find a solution .</p>
]]></description><link>https://lankadevelopers.lk/post/3918</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3918</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Thu, 17 Sep 2020 13:38:42 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 13:33:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> root I want to group data by year and tyepe, I tried to do it using mysql. but failed.</p>
]]></description><link>https://lankadevelopers.lk/post/3917</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3917</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Thu, 17 Sep 2020 13:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to Php  Group by problem. on Thu, 17 Sep 2020 13:24:08 GMT]]></title><description><![CDATA[<p dir="auto">Not clear about your columns ? which columns you wants to group ??</p>
]]></description><link>https://lankadevelopers.lk/post/3916</link><guid isPermaLink="true">https://lankadevelopers.lk/post/3916</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Thu, 17 Sep 2020 13:24:08 GMT</pubDate></item></channel></rss>