Developers Archive for January, 2007

Javascript Function: isNaN

Javascript Function:  isNaN Wednesday, January 31st, 2007

isNaN(testvalue)
 
The isNaN function is used to determine if the argument, testvalue, is a NaN.
 
A NaN, which means “Not-a-Number”, is classified as a primitive value by the ECMA-262 standard and indicates that the specified value is not a legal number. The function returns true if the argument is not a number and false if the argument is a number.
 
The classic example of a NaN is zero divided by zero, 0/0.
 
Code:
document.write(isNaN(”Ima String”))
document.write(isNaN(0/0))
document.write(isNaN(”348″))
document.write(isNaN(348))
 
Output:
true
true
false
false

Session

Session Wednesday, January 31st, 2007

Working with sessions in PHP is very basic. You can store values to session as key/value pairs.
To store and receive data from sessions are very easy to use.

Start Session
session_start();
$_SESSION['PHPSESSID'] = "123456";

Retrieve Value:
session_start();
echo $_SESSION['mySessionName'];

Types of Subqueries

Types of Subqueries Wednesday, January 31st, 2007

There are three types of subqueries, differentiated by how many rows and columns they return.

1. Scalar subqurey
2. Row subquery
3. Table subquery

Scalar subquery :
If a subquery returns exactly one column and one row, it is known as a scalar subquery.

Row subquery :
If a subquery returns multiple columns and exactly one row, it is known as a row subquery. A row subquery is a derivation of a scalar subquery and can thus be used anywhere that a scalar subquery can be used.

Table subquery :
if a subquery can return multiple columns and multiple rows, it is known as a table subquery. A table subquery is legal everywhere that a table reference is legal in an SQL statement, including the FROM clause of a SELECT. It, too, is usually found in a WHERE clause, immediately after an IN or EXISTS predicate or a quantified comparison operator.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.