Difference between Row_number() and dense_rank()

Difference between Row_number() and dense_rank(): Row_number(): It is used to select the records. Dense_rank(): It is used to select the distinct records. Rank(): Rank will also select the distinct records. But difference with dense_rank() is it will give the rank to 5 if it starts from second row and continuous three records are same, then it will assign the next

117 total views, no views today

» Read more

Icefaces user session expired popup

Icefaces user session expired popup: Icefaces user session expired popup issue has been resolved after adding the below entries in the deployment descriptors (web.xml), The below one will redirect you to the ERRORPAGE.jsp onclick of any button after session timeout, <context-param> <param-name>org.icefaces.sessionExpiredRedirectURI</param-name> <param-value>/ERRORPAGE.jsp</param-value> </context-param> But ensure you have added this entry too, <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/ERRORPAGE.jsp</location> </error-page> If you want to

240 total views, no views today

» Read more

PHP Hello world Cron Job in Cpanel (step by step explained)

PHP Hello world Cron Job in Cpanel (step by step explained) Step 1: Login to cpanel and click the Cron Jobs. Step 2: Choose the Cron Job (repetions like every 5 minutes, one hour once, one day once etc..,) Step 3: Give the command like this in the above image, php -q -f /home/YOUR_LOGIN_NAME/public_html/croncheck.php Step 4: croncheck.php contains simple echo,

179 total views, no views today

» Read more

How to check whether the variable is present or not in php ?

Checking variable presence in php: isset(): isset() is a function used to identify whether the variable is present or not in the php programs. It will take the variable name as argument and returns the boolean results(true/false). PHP Program to check variable presence in the code: <?php $var1 = 10; if(isset($var1)){ echo ‘$var1 Variable is there’."\n"; }else{ echo ‘$var1 Variable

140 total views, no views today

» Read more

PHP Reference Operator(&) with example

Reference operator: Reference operator(&) introduced in php 4.0 version. Why we need reference operator ? Consider this is the scenario, We have variable a and b. Variable a value assigned to variable b. If we are changing the variable a value frequently after the value assignment to variable b, it will not be reflected. To overcome the above issue reference

115 total views, no views today

» Read more

$ vs $$ in php examples

$ vs $$ in php: $ can be used for variables. $$ can be used to assign the values to the existing variables values. Sample PHP Program: <?php $val = ‘value1’; // Assigning values to value1 variable directly using $$. $$val = 10; echo "Printing val variable ::: ".$val; echo "\n"; echo "Printing val variables value(here value1) :::".$$val; echo "\n";

106 total views, no views today

» Read more

How to use constants in PHP ?

How to use constants in PHP ? Constants in php should not be declared/defined with $. Constants in any programming language will be used to store the predefined values. Eg: PI -> 3.14 NEXTLINE -> \n etc.., Sample PHP program with constants: <?php define("NEXTLINE","\n"); echo "Hello ".NEXTLINE."world"; ?> Output: Hello world Note: Here \n declared as a constant and used

140 total views, no views today

» Read more

PHP Most used Date format Example

Some of the important PHP date formats are given below with examples, 1. Printing time and day [12 hour format]: <?php echo date(‘g:i, jS F’); ?> Output: 3:51, 17th March 2. Printing time and day [24 hour format]: <?php echo date(‘H:i, jS F’); ?> Output: 15:52, 17th March 3. Printing month:date:year <?php echo date(‘m.d.y’); ?> Output: 03.17.14 4. Printing time

149 total views, no views today

» Read more
1 2