Tuesday, 19 March 2019

differmce between where and having clause in mysql

https://javarevisited.blogspot.com/2013/08/difference-between-where-vs-having-clause-SQL-databse-group-by-comparision.html


Key point, which is also the main difference between WHERE and HAVING clause in SQL is that, condition specified in WHERE clause is used while fetching data (rows) from table, and data which doesn't pass the condition will not be fetched into result set, on the other hand HAVING clause is later used to filter summarized data or grouped data

Monday, 18 March 2019

Thursday, 7 March 2019

S3 Example

https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/java/example_code

Wednesday, 6 March 2019

check if array contains all array values from another array

$containsSearch = count(array_intersect($search_this, $all)) == count($search_this);


How to merge two arrays of object in PHP

https://stackoverflow.com/questions/11877586/how-to-merge-two-arrays-of-object-in-php


//both arrays will be merged including duplicates
$result = array_merge( $array1, $array2 );
//duplicate objects will be removed
$result = array_map("unserialize", array_unique(array_map("serialize", $result)));
//array is sorted on the bases of id
sort( $result );