Two Marks: (2 x 5 = 10)
- Tell whether PHP variable and keywords are case sensitive?
- List the different data types supported in PHP.
- Write a console application in PHP for generating Prime Numbers between 1 to 50.
- How do you create arrays in PHP. Give an example.
- Write a sample code in PHP for creating and using Objects.
Big Question:
- Discuss in details the functions used for generating Summary Reports in MySQL. (8)
(OR)
- List any four string related functions in MySQL and explain its syntax. (8)
- Create a table called "project" which contains the following data: (16)
empno
|
projectID
|
projectname
|
budget
|
---|---|---|---|
15
|
1
|
Interface
Design
|
10000
|
17
|
2
|
E-Commerce
Solution
|
20000
|
19
|
3
|
Advertising
|
50000
|
The employee number (empno) belongs to the employee who is in charge
of project. Choose appropriate datatypes for each of the fields.
Create the table and insert the data. Decide which keys you might
need (primary key, foreign key) and make sure that these are
correctly implemented.
Hint: If MySQL complains about warnings or errors when you insert the
data, use "show warnings" and "show errors" to
look at the warnings and errors.
- The company has decided that the budgets are too small. Update the project table. Add 5000 to each of the budgets.
- The company decides to take project number 3 from employee 19 and give it to employee 20. Update the table to reflect this change.
(OR)
- a) How to use MySQL left join to select data from multiple tables? Explain (8)
b)
What is metadata in MySQL? How to obtain it and use it?
Explain. (8)
- a) What is PHP? What does it do? List out its features? (8)
b) Mention the scalar data-types provided by PHP? Explain with Examples (8)
(OR)
- Write a console application in PHP to find the factorial of first 10 numbers. (16)