Wednesday, February 25, 2009

Usage of Ajax:

Huge web corporations like Yahoo, Google and MSN are making huge investments into develping new websites and converting their existing services to Ajax. The latest version of Google Groups, Google Live Search, Google Maps, Gmal, Flickr, , Live Mail, Yahoo mail all are Ajaxified and use Ajax extensively.

Advantages of Ajax:

Rich User Interface

Ajax allows us to create highly interactive user interface. A user like page refresh continuously like typical web pages but they act more like desktop applications thus increasing the usability and interactivity.

Higher Performance

With reduction of page refresh comes reduction of loading times and faster response to actions. There is no requirement of post back to HTML thus creating a refresh and reload of the whole page

Ajax for Web Applications:

Asynchronous JavaScript and XML (AJAX) which is the most spoken about technology on the web today is actually not a technology in itself but a term which describes a new approach which looks into using a number of existing technologies like XHTML, CSS, Java Script, DOM, XML and the XMLHttpRequest object to develop quick website user interfaces which not only avoids reload of entire browser page but also offer lots of other responsive features.

The core component of Ajax is XMLHttpRequest that enables execution of server side code without any page refresh. Ajax can send asynchronous requests to the server using JavaScript and XMLHttpRequest object and mapping functions that will be executed when response is received.

The beauty of Ajax is that, you can execute server side code with out any page refresh. Ajax is a world of “No Page Refresh” and rich user interface like windows applications. In traditional web applications, the user actions in the user interface invoke an HTTP request to the web server. Then the server will do lot of process on the server and then returns an HTML page to the client. In Ajax applications, the request is not for GUI or HTML, It is only for data. After fetching the data, you can create the user interface from the client using JavaScript and DOM. Ajax is a client-side technology and can interact with any server side technologies such as PHP, ColdFusion, ASP.net, JSP, and others.

Sunday, February 22, 2009

GROUP BY (Aggregate) Functions

AVG() Return the average value of the argument
BIT_AND() Return bitwise and
BIT_OR() Return bitwise or
BIT_XOR()(v4.1.1) Return bitwise xor
COUNT(DISTINCT) Return the count of a number of different values
COUNT() Return a count of the number of rows returned
GROUP_CONCAT()(v4.1) Return a concatenated string
MAX() Return the maximum value
MIN() Return the minimum value
STD() Return the population standard deviation
STDDEV_POP()(v5.0.3) Return the population standard deviation
STDDEV_SAMP()(v5.0.3) Return the sample standard deviation
STDDEV() Return the population standard deviation
SUM() Return the sum
VAR_POP()(v5.0.3) Return the population standard variance
VAR_SAMP()(v5.0.3) Return the sample variance
VARIANCE()(v4.1) Return the population standard variance

Tuesday, February 17, 2009

How many ways can we get the value of current session id?

session_id() returns the session id for the current session.

What’s the difference between include and require?

It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.