Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

Who Is The Father Of Php And What Is The Current Version Of Php And Mysql?

Answer»

Rasmus Lerdorf.
PHP 5.1. BETA
MYSQL 5.0

Rasmus Lerdorf.
PHP 5.1. Beta
MySQL 5.0

102.

In How Many Ways We Can Retrieve Data In The Result Set Of Mysql Using Php?

Answer»

mysql_fetch_array - FETCH a result ROW as an associative ARRAY, a numeric array, or both.

mysql_fetch_assoc - Fetch a result row as an associative array.

mysql_fetch_object - Fetch a result row as an object.

mysql_fetch_row —- GET a result row as an ENUMERATED array.

mysql_fetch_array - Fetch a result row as an associative array, a numeric array, or both.

mysql_fetch_assoc - Fetch a result row as an associative array.

mysql_fetch_object - Fetch a result row as an object.

mysql_fetch_row —- Get a result row as an enumerated array.

103.

How Can We Increase The Execution Time Of A Php Script?

Answer»

By the use of void set_time_limit(int seconds) SET the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value DEFINED in the php.ini. If seconds is set to ZERO, no time limit is imposed.

When called, set_time_limit() restarts the timeout counter from zero. In other WORDS, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.

By the use of void set_time_limit(int seconds) Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini. If seconds is set to zero, no time limit is imposed.

When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.

104.

How To Set Cookies?

Answer»

Answer : setcookie('variable','VALUE','time') ; variable - NAME of the cookie variable value - value of the cookie variable time - expiry time

EXAMPLE:

setcookie('Test',$i,time()+3600);
Test - cookie variable name
$i - value of the variable 'Test'
time()+3600 - denotes that the cookie will expire after an one HOUR.

Example:

setcookie('Test',$i,time()+3600);
Test - cookie variable name
$i - value of the variable 'Test'
time()+3600 - denotes that the cookie will expire after an one hour.

105.

How Can We Get The Properties (size, Type, Width, Height) Of An Image Using Php Image Functions?

Answer»

To know the image size USE getimagesize() FUNCTION
To know the image width use imagesx() function
To know the image HEIGHT use imagesy() function

To know the image size use getimagesize() function
To know the image width use imagesx() function
To know the image height use imagesy() function

106.

What Is The Functionality Of The Function Htmlentities?

Answer»

htmlentities() - Convert all applicable CHARACTERS to HTML ENTITIES
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML CHARACTER ENTITY equivalents are TRANSLATED into these entities.

htmlentities() - Convert all applicable characters to HTML entities
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.

107.

How To Reset/destroy A Cookie ?

Answer»

Reset a COOKIE by SPECIFYING expire TIME in the past:
Example: setcookie('Test',$i,time()-3600); // already EXPIRED time
Reset a cookie by specifying its name only
Example: setcookie('Test');

Reset a cookie by specifying expire time in the past:
Example: setcookie('Test',$i,time()-3600); // already expired time
Reset a cookie by specifying its name only
Example: setcookie('Test');

108.

What Is The Difference Between Htmlentities() And Htmlspecialchars()?

Answer»

HTMLSPECIALCHARS() - Convert some special characters to HTML entities (Only the most WIDELY USED)

htmlentities() - Convert ALL special characters to HTML entities.

htmlspecialchars() - Convert some special characters to HTML entities (Only the most widely used)

htmlentities() - Convert ALL special characters to HTML entities.

109.

What Types Of Images That Php Supports ?

Answer»

Using imagetypes() function to find out what types of IMAGES are supported in your PHP engine.

imagetypes() - RETURNS the image types supported.

This function returns a bit-field corresponding to the image formats supported by the VERSION of GD linked into PHP. The FOLLOWING bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM.

Using imagetypes() function to find out what types of images are supported in your PHP engine.

imagetypes() - Returns the image types supported.

This function returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM.

110.

What Are Encryption Functions In Php?

Answer»

CRYPT()
MD5()

CRYPT()
MD5()

111.

Check If A Variable Is An Integer In Javascript ?

Answer»

VAR myValue =9.8;
if(parseInt(myValue)== myValue)
ALERT('INTEGER');
ELSE
alert('Not an integer');

var myValue =9.8;
if(parseInt(myValue)== myValue)
alert('Integer');
else
alert('Not an integer');

112.

What Are The Functions For Imap?

Answer»

imap_body - READ the message body
imap_check - Check CURRENT MAILBOX
imap_delete - Mark a message for deletion from current mailbox
imap_mail - SEND an email message

imap_body - Read the message body
imap_check - Check current mailbox
imap_delete - Mark a message for deletion from current mailbox
imap_mail - Send an email message

113.

In How Many Ways We Can Retrieve Data In The Result Set Of Mysql Using Php?

Answer»

mysql_fetch_array - FETCH a result row as an ASSOCIATIVE array, a NUMERIC array, or both
mysql_fetch_assoc - Fetch a result row as an associative array
mysql_fetch_object - Fetch a result row as an object
mysql_fetch_row - GET a result row as an enumerated array

mysql_fetch_array - Fetch a result row as an associative array, a numeric array, or both
mysql_fetch_assoc - Fetch a result row as an associative array
mysql_fetch_object - Fetch a result row as an object
mysql_fetch_row - Get a result row as an enumerated array

114.

Tools Used For Drawing Er Diagrams?

Answer»

CASE STUDIO.
SMART DRAW.

Case Studio.
Smart Draw.

115.

Who Is The Father Of Php And What Is The Current Version Of Php And Mysql?

Answer»

Rasmus Lerdorf.
PHP 5.1. BETA
MYSQL 5.0

Rasmus Lerdorf.
PHP 5.1. Beta
MySQL 5.0

116.

How Can We Submit From Without A Submit Button?

Answer»

Trigger the JavaScript code on any EVENT ( like onSelect of drop down list BOX, onfocus, etc ) DOCUMENT. myform.SUBMIT(); This will submit the form.

Trigger the JavaScript code on any event ( like onSelect of drop down list box, onfocus, etc ) document. myform.submit(); This will submit the form.

117.

How Can I Retrieve Values From One Database Server And Store Them In Other Database Server Using Php?

Answer»

For this purpose, you can first read the DATA from one SERVER into session variables. Then CONNECT to other server and simply insert the data into the DATABASE.

For this purpose, you can first read the data from one server into session variables. Then connect to other server and simply insert the data into the database.

118.

How Can We Destroy The Cookie?

Answer»

SET the COOKIE with a PAST EXPIRATION TIME.

Set the cookie with a past expiration time.

119.

How Can We Encrypt And Decrypt A Data Presented In A Table Using Mysql?

Answer»

You can USE FUNCTIONS: AES_ENCRYPT() and AES_DECRYPT() LIKE:

AES_ENCRYPT(STR, key_str)
AES_DECRYPT(crypt_str, key_str)

You can use functions: AES_ENCRYPT() and AES_DECRYPT() like:

AES_ENCRYPT(str, key_str)
AES_DECRYPT(crypt_str, key_str)

120.

What Are The Current Versions Of Apache, Php, And Mysql?

Answer»

PHP: PHP 5.1.2
MYSQL: MySQL 5.1
APACHE: Apache 2.1

PHP: PHP 5.1.2
MySQL: MySQL 5.1
Apache: Apache 2.1

121.

What Is Meant By Nl2br()?

Answer»

NL2BR() INSERTS a HTML TAG
before all new line CHARACTERS n in a string.

echo nl2br("god bless n you");

output:
god bless
you

nl2br() inserts a HTML tag
before all new line characters n in a string.

echo nl2br("god bless n you");

output:
god bless
you

122.

What Are The Reasons For Selecting Lamp (linux, Apache, Mysql, Php) Instead Of Combination Of Other Software Programs, Servers And Operating Systems?

Answer»

All of those are open SOURCE resource. SECURITY of Linux is very more than WINDOWS. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other SCRIPTING LANGUAGE.

All of those are open source resource. Security of Linux is very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.

123.

What Are The Features And Advantages Of Object Oriented Programming?

Answer»

One of the main advantages of OO PROGRAMMING is its ease of modification; objects can easily be modified and added to a SYSTEM there by reducing MAINTENANCE costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural HUMAN cognition patterns. For some systems, an OO approach can speed development time since many objects are standard across systems and can be REUSED. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.

One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns. For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.

124.

What Are The Differences Between Mysql_fetch_array(), Mysql_fetch_object(), Mysql_fetch_row()?

Answer»

mysql_fetch_array - Fetch a result row as an associative array and a numeric array.

mysql_fetch_object - Returns an object with PROPERTIES that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows.

mysql_fetch_row() - Fetches ONE row of data from the result associated with the SPECIFIED result identifier. The row is RETURNED as an array. Each result column is stored in an array offset, starting at offset 0.

mysql_fetch_array - Fetch a result row as an associative array and a numeric array.

mysql_fetch_object - Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows.

mysql_fetch_row() - Fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.

125.

How Can We Get Second Of The Current Time Using Date Function?

Answer»

$SECOND = DATE("s");

$second = date("s");

126.

What Is The Maximum Size Of A File That Can Be Uploaded Using Php And How Can We Change This?

Answer»

You can CHANGE maximum size of a file SET upload_max_filesize VARIABLE in php.ini file.

You can change maximum size of a file set upload_max_filesize variable in php.ini file.

127.

How Can I Make A Script That Can Be Bilingual (supports English, German)?

Answer»

You can change char set VARIABLE in above LINE in the script to SUPPORT bi LANGUAGE.

You can change char set variable in above line in the script to support bi language.

128.

Can We Use Include(abc.php) Two Times In A Php Page Makeit.php?

Answer»

YES we can include that many times we WANT, but here are some THINGS to make sure of: (INCLUDING abc.PHP, the file names are case-sensitive) there shouldn't be any duplicate function names, means there should not be functions or classes or variables with the same NAME in abc.PHP and makeit.php.

Yes we can include that many times we want, but here are some things to make sure of: (including abc.PHP, the file names are case-sensitive) there shouldn't be any duplicate function names, means there should not be functions or classes or variables with the same name in abc.PHP and makeit.php.

129.

What Are The Difference Between Abstract Class And Interface?

Answer»

Abstract class: abstract classes are the class where one or more methods are abstract but not NECESSARILY all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The DEFINITION of those methods must be in its extending class.

INTERFACE: INTERFACES are one type of class where all the methods are abstract. That MEANS all the methods only declared but not defined. All the methods must be define by its implemented class

Abstract class: abstract classes are the class where one or more methods are abstract but not necessarily all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The definition of those methods must be in its extending class.

Interface: Interfaces are one type of class where all the methods are abstract. That means all the methods only declared but not defined. All the methods must be define by its implemented class

130.

What Are The Advantages Of Stored Procedures, Triggers, Indexes?

Answer»

A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side. TRIGGERS will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.

Indexes are used to find rows with specific column values quickly. Without an index, MYSQL MUST begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in QUESTION, MySQL can quickly determine the POSITION to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.

A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side. Triggers will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.

Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.

131.

What Is The Difference Between Php4 And Php5?

Answer»

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.

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.

132.

Explain Normalization Concept?

Answer»

The NORMALIZATION PROCESS involves getting our data to conform to three progressive normal forms, and a higher level of normalization cannot be achieved until the PREVIOUS levels have been achieved (there are actually FIVE normal forms, but the last two are mainly academic and will not be DISCUSSED).

First Normal Form
The First Normal Form (or 1NF) involves removal of redundant data from horizontal rows. We want to ensure that there is no duplication of data in a given row, and that every column stores the least amount of information possible (making the field atomic).

Second Normal Form
Where the First Normal Form deals with redundancy of data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns. As stated earlier, the normal forms are progressive, so to achieve Second Normal Form, your tables must already be in First Normal Form.

Third Normal Form
I have a confession to make; I do not often use Third Normal Form. In Third Normal Form we are looking for data in our tables that is not fully dependant on the primary key, but dependant on another value in the table

The normalization process involves getting our data to conform to three progressive normal forms, and a higher level of normalization cannot be achieved until the previous levels have been achieved (there are actually five normal forms, but the last two are mainly academic and will not be discussed).

First Normal Form
The First Normal Form (or 1NF) involves removal of redundant data from horizontal rows. We want to ensure that there is no duplication of data in a given row, and that every column stores the least amount of information possible (making the field atomic).

Second Normal Form
Where the First Normal Form deals with redundancy of data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns. As stated earlier, the normal forms are progressive, so to achieve Second Normal Form, your tables must already be in First Normal Form.

Third Normal Form
I have a confession to make; I do not often use Third Normal Form. In Third Normal Form we are looking for data in our tables that is not fully dependant on the primary key, but dependant on another value in the table

133.

What Are The Mysql Database Files Stored In System ?

Answer»

DATA is STORED in name.myd
Table STRUCTURE is stored in name.frm
INDEX is stored in name.myi

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

134.

What's The Difference Between Accessing A Class Method Via -> And Via ::?

Answer»

:: is ALLOWED to ACCESS METHODS that can perform static operations, i.e. those, which do not REQUIRE OBJECT initialization.

:: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.

135.

If We Login More Than One Browser Windows At The Same Time With Same User And After That We Close One Window, Then Is The Session Is Exist To Other Windows Or Not? And If Yes Then Why? If No Then Why?

Answer»

SESSION depends on BROWSER. If browser is closed then session is LOST. The session data will be deleted after session TIME out. If connection is lost and you recreate connection, then session will CONTINUE in the browser.

Session depends on browser. If browser is closed then session is lost. The session data will be deleted after session time out. If connection is lost and you recreate connection, then session will continue in the browser.

136.

What Are The Advantages And Disadvantages Of Cascade Style Sheets?

Answer»

EXTERNAL Style Sheets
Advantages
Can control styles for multiple documents at once Classes can be created for use on multiple HTML element types in many documents Selector and grouping methods can be used to apply styles under complex CONTEXTS

Disadvantages

An EXTRA download is required to import style information for each document The rendering of the document may be delayed until the external style sheet is loaded Becomes slightly unwieldy for small quantities of style definitions

Embedded Style Sheets
Advantages
Classes can be created for use on multiple tag types in the document Selector and grouping methods can be used to apply styles under complex contexts No additional downloads necessary to receive style information

Disadvantage

This method can not control styles for multiple documents at once

Inline Styles
Advantages
Useful for small quantities of style definitions Can override other style specification methods at the local level so only exceptions need to be listed in conjunction with other style methods

Disadvantages

Does not DISTANCE style information from content (a main GOAL of SGML/HTML) Can not control styles for multiple documents at once Author can not create or control classes of elements to control multiple element types within the document Selector grouping methods can not be used to create complex element addressing scenarios

External Style Sheets
Advantages
Can control styles for multiple documents at once Classes can be created for use on multiple HTML element types in many documents Selector and grouping methods can be used to apply styles under complex contexts

Disadvantages

An extra download is required to import style information for each document The rendering of the document may be delayed until the external style sheet is loaded Becomes slightly unwieldy for small quantities of style definitions

Embedded Style Sheets
Advantages
Classes can be created for use on multiple tag types in the document Selector and grouping methods can be used to apply styles under complex contexts No additional downloads necessary to receive style information

Disadvantage

This method can not control styles for multiple documents at once

Inline Styles
Advantages
Useful for small quantities of style definitions Can override other style specification methods at the local level so only exceptions need to be listed in conjunction with other style methods

Disadvantages

Does not distance style information from content (a main goal of SGML/HTML) Can not control styles for multiple documents at once Author can not create or control classes of elements to control multiple element types within the document Selector grouping methods can not be used to create complex element addressing scenarios

137.

How Can We Know That A Session Is Started Or Not?

Answer»

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().

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().

138.

How Can We Change The Data Type Of A Column Of A Table?

Answer»

This will change the DATA TYPE of a column:
ALTER TABLE table_name CHANGE colm_name same_colm_name [NEW data type].

This will change the data type of a column:
ALTER TABLE table_name CHANGE colm_name same_colm_name [new data type].

139.

How Can We Know The Number Of Days Between Two Given Dates Using Mysql?

Answer»

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

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

140.

How Can I Load Data From A Text File Into A Table?

Answer»

The MYSQL provides a LOAD DATA INFILE command. You can load data from a FILE.
GREAT TOOL but you need to make sure that:

a) Data must be delimited.
b) Data fields must MATCH table columns correctly.

The MySQL provides a LOAD DATA INFILE command. You can load data from a file.
Great tool but you need to make sure that:

a) Data must be delimited.
b) Data fields must match table columns correctly.

141.

What Is The Functionality Of Md5 Function In Php?

Answer»

STRING md5(string)
It calculates the MD5 HASH of a string. The hash is a 32-character HEXADECIMAL NUMBER.

string md5(string)
It calculates the MD5 hash of a string. The hash is a 32-character hexadecimal number.

142.

What Type Of Inheritance That Php Supports?

Answer»

In PHP an EXTENDED class is always dependent on a SINGLE base class, that is, MULTIPLE inheritance is not supported. CLASSES are extended USING the keyword 'extends'.

In PHP an extended class is always dependent on a single base class, that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'.

143.

Will Comparison Of String "10" And Integer 11 Work In Php?

Answer»

Yes, INTERNALLY PHP will cast everything to the integer TYPE, so NUMBERS 10 and 11 will be COMPARED.

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

144.

How Can Increase The Performance Of Mysql Select Query?

Answer»

We can USE LIMIT to STOP MySql for further search in table after we have received our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead of FULL join in cases we have related DATA in two or more tables.

We can use LIMIT to stop MySql for further search in table after we have received our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead of full join in cases we have related data in two or more tables.

145.

How Can We Change The Name Of A Column Of A Table?

Answer»

MySQL QUERY to rename table: RENAME TABLE tbl_name TO new_tbl_name
or,
ALTER TABLE tableName CHANGE OldName newName.

MySQL query to rename table: RENAME TABLE tbl_name TO new_tbl_name
or,
ALTER TABLE tableName CHANGE OldName newName.

146.

How Can We Encrypt And Decrypt A Data Present In A Mysql Table Using Mysql?

Answer»

AES_ENCRYPT() and AES_DECRYPT().

AES_ENCRYPT() and AES_DECRYPT().

147.

What Is The Difference Between Char And Varchar Data Types?

Answer»

CHAR is a fixed LENGTH DATA type. CHAR(n) will take n characters of STORAGE even if you enter less than n characters to that column. For EXAMPLE, "Hello!" will be stored as "Hello! " in CHAR(10) column.

VARCHAR is a variable length data type. VARCHAR(n) will take only the REQUIRED storage for the actual number of characters entered to that column. For example, "Hello!" will be stored as "Hello!" in VARCHAR(10) column.

CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, "Hello!" will be stored as "Hello! " in CHAR(10) column.

VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, "Hello!" will be stored as "Hello!" in VARCHAR(10) column.

148.

When You Want To Show Some Part Of A Text Displayed On An Html Page In Red Font Color? What Different Possibilities Are There To Do This? What Are The Advantages/disadvantages Of These Methods?

Answer»

There are 2 ways to show some part of a text in red:

1. Using HTML TAG <FONT color="red">
2. Using HTML tag </font>

There are 2 ways to show some part of a text in red:

1. Using HTML tag <font color="red">
2. Using HTML tag </font>

149.

When Viewing An Html Page In A Browser, The Browser Often Keeps This Page In Its Cache. What Can Be Possible Advantages/disadvantages Of Page Caching? How Can You Prevent Caching Of A Certain Page (please Give Several Alternate Solutions)?

Answer»

When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet FILES folder.

A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is PARSED, it is read from top to BOTTOM. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed. To properly PREVENT the Web page from appearing in the cache, place another header section at the end of the HTML document.

When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder.

A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed. To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document.

150.

Give The Syntax Of Revoke Commands?

Answer»

The generic syntax for revoke is as FOLLOWING
REVOKE [rights] on [database] FROM [username@hostname]

Now rights can be:
a) ALL privilages
B) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.

We can GRANT rights on all databse by usingh *.* or some specific database by database.* or a specific table by database.table_name.

The generic syntax for revoke is as following
REVOKE [rights] on [database] FROM [username@hostname]

Now rights can be:
a) ALL privilages
b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.

We can grant rights on all databse by usingh *.* or some specific database by database.* or a specific table by database.table_name.