Paltalk Plus Free Trial

What is the differnce between Int32.Parse, Convert.Toint32 and (int)?

The Convert.ToInt32(String, IFormatProvider) underneath calls the Int32.Parse. So the only difference is that if a null string is passed to Convert it returns 0, whereas Int32.Parse throws an ArgumentNullException.

(int) will only convert types that can be represented as an integer (ie double, long, float, etc) although some data loss may occur

Uncategorized ,

How will you know that a session is started or not (PHP)?

A session starts by session_start() function.
This session_start() is always declared in header portion. it always declares first. then we write session_register().

Uncategorized

What are the different functions available to find the current date using MySQL?

SELECT CURDATE();
SELECT CURRENT_DATE();
SELECT CURTIME();
SELECT CURRENT_TIME();

Uncategorized

What is the syntax of datediff function in MySql?

SELECT DATEDIFF(NOW(),'2006-07-01');

Uncategorized

Give the syntax of GRANT and REVOKE commands?

GRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password]
REVOKE [rights] on [database] FROM [username@hostname]

Uncategorized

How and where are the MySQL database files stored in system ?

Data is stored in name.myd
Table structure is stored in name.frm
Index is stored in name.myi

Uncategorized

What is the difference between PHP4 and PHP5?

PHP4 cannot support oops concepts and Zend engine 1 is used.
PHP5 supports oops concepts and Zend engine 2 is used.
Error supporting is increased in PHP5.
XML and SQLLite will is increased in PHP5.

Uncategorized

Will comparison of string “250″ and integer 251 work in PHP?

Yes, internally PHP will cast everything to the integer type, so numbers 250 and 251 will be compared.

Uncategorized

What are the different functions in sorting an array available in PHP?

Sorting functions in PHP:
asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()

Uncategorized

What is the use of MYSQL_FREE_RESULT() function?

This function frees result memory used by a query.

int mysql_free_result (int result)

However usually we dont use this function, as connections to MySQL are automatically
closed after a script executes. This may be used for sceanrios where we want to clear the result memory immidiately after they are fetched.

Uncategorized



Paltalk Plus Free Trial