Interview Questions

Question : What are the different tables present in MySQL, which type of table is generated when we are creating a table in the following syntax:

create table employee (eno int(2),ename varchar(10)) ?
Answer : Total 5 types of tables we can create
1. MyISAM
2. Heap
3. Merge
4. INNO DB
5. ISAM
MyISAM is the default storage engine as of MySQL 3.23 and as a result if
we do not specify the table name explicitly it will be assigned to the
default engine.

Question : How can we encrypt the username and password using PHP?
Answer : The functions in this section perform encryption and decryption, and
compression and uncompression:
EncryptionDecryption
AES_ENCRYT()AES_DECRYPT()
ENCODE()DECODE()
DES_ENCRYPT()DES_DECRYPT()
ENCRYPT()Not available
MD5()Not available
OLD_PASSWORD()Not available
PASSWORD()Not available
SHA() or SHA1()Not available


Question : Suppose your Zend engine supports the mode <? ?>. Then how can you

configure your PHP Zend engine to support <?php ?>mode ?

Answer : In php.ini file:
set
short_open_tag=on
to make PHP support


Question : In how many ways we can retrieve the data in the result set of
MySQL using PHP?
Answer : You can do it by 4 Ways
1. mysql_fetch_row.
2. mysql_fetch_array
3. mysql_fetch_object
4. mysql_fetch_assoc

No comments:

How calulation total value for HTML input text?

<script> $j(document).ready(function(){ $j(":text").keyup(function(){ if (isNaN($j(this).val())) { alert(...