Set - 6

Question 11 :

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)


Question 12 :

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.

Question 13 :

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

Question 14 :

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

Question 15 :

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