BBA Iind SEMESTER EXAMINATION 2008-09 s19

Integrated BCA+MCA VIII (Eight) Semester Examination 2013-14

Course Code:ICA801 Paper ID:0878101

PHP

Time: 3 Hours Max. Marks: 70 Max Marks: 75

Note: Attempt six questions in all. Q. No. 1 is compulsory.

1. Answer any five of the following (limit your answer in 50 words). (4x5=20)

a) How to define constants and variables in PHP?

b) Explain the importance of MySQL and Apache Web Server.

c) Develop a PHP application to merge two sorted arrays.

d) Explain different data types of MySQL.

e) What is exception? How PHP handles exceptions?

f) Write a program that keeps track of how many times a visitor has loaded the page.

g) What are the different ways to retrieve the data in the result set of MySQL using PHP?

h) Discuss the super global variables of PHP.

2. Discuss about string functions used in PHP with example. (10)

3. How the date functions are used in PHP? Discuss any five date functions with example. (10)

4. Explain following functions with syntax and example: (2x5=10)

a) SORT()

b) STRPOS()

c) PHP$-GET()

d) RTRIM()

e) PHP$_POST()

5. What is session? Construct the various session for an application that performs addition and deletion of employees. (10)

6. Explain the different file system functions with example. (10)

7. Write a program to read customer information like cust_no, cust_name, item_purchased and mob_no from customer table and display all these information in table format on output screen. (10)

8. An organization wishes to maintain the status about the working hours made by its employees. For that purpose the following tables are used: (10)

EMP (EID:INTEGER, ENAME:STRING, AGE:INTEGER,

SALARY:REAL)

WORKS (EID:INTEGER, DID:INTEGER,

PCT_NAME:INTEGER)

DEPT (DID:INTEGER, BUDGET:REAL,

MANAGERID:INTEGER)

An employee can work in more than one department; the PCT_NAME field of the works relation shows the percentage of time that a given employee works in a given department.

Answer the following queries in MySQL:

a)  Print the names and ages of each employee who works in both hardware and software departments.

b)  Print the name of each employee whose salary exceeds the budget of all of the departments that he or she work in.

c)  Find the average manager salary.

d)  Find the MANAGERID’s of managers who manage only departments with budget greater that 1,000,00.

e)  Find the MANAGERID’s of mangers who control the highest amount.