Posts

Showing posts from October, 2011

Difference Between InnoDB and MyISAM

1. The big difference between MySQL Table Type MyISAM and InnoDB is that InnoDB supports transaction 2. InnoDB supports some newer features: Transactions, row-level locking, foreign keys 3. InnoDB is for high volume, high performance 4.Most people use MyISAM if they need speed and InnoDB for data integrity

Difference Between array_merge() and array_combine

array_merge() :-array_merge() function Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. If the input arrays have the same string keys, then the value for that key of first array will overwrite by the value of next array. If, however, the arrays contain numeric keys, the later value will not overwrite the original value, but will be added at the last of the array. Example: $array1 = array("name" =>"vikram", 2, 5); $array2 = array("a", "b", "name" =>; "mohan", "designation" => "TL", 5); $arrayMergeResult = array_merge($array1, $array2); print_r($arrayMergeResult); ?>   Result of above query will be: array( [name] => mohan,  [0] => 2,  [1] => 5,  [2] => a,  [3] => b,  [designation] => TL,  [4] => 5  ) array_merge() :- array_combine() function creates a n...

GROUP BY statement in mysql

The GROUP BY statement is used in combined with the aggregate functions to group the result-set by one or more columns. Aggregate functions:- aggregate functions are function whose return a single result.Such As MAX(),MIN().AVG(),SUM() and etc MySQL GROUP BY Syntax SELECT column_name, aggregate_function(column_name) FROM table_name WHERE condition GROUP BY column_name MySQL GROUP BY Example We have the following "tbl_order" table: Id OrderDate Price Customer 1 2008/11/12 1000 Vikram 2 2008/10/23 1600 Mohan 3 2008/09/02 700 Vikram 4 2008/09/03 300 Vikram 5 2008/08/30 2000 Rajeev 6 2008/10/04 100 Mohan Now we want to find the total sum (total order) of each customer. We will have to use the GROUP BY statement to group the customers. We use the following SQL statement: SELECT Custom...

Difference Between Synchronous And Asynchronous Javascript

Both Synchronous or Asynchronous AJAX requests involve the same process of making the request and getting the response from the server. The only difference is that in an Asynchronous request the process is handled independently and is not dependent on following processes. So that the script do not wait for the server request to complete before executing the remaining lines of code. As soon as the server response is completed it is sent back to the client, but during the complete round-trip the client is not halted. However in case of Synchronous AJAX request, the request is sent to the server and the client waits for the server’s response before it executes the script further. So this is the special case when the further script is dependent on the results returned by the server.