12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 05/09/2019
Connecting PHP and MYSQL
Download Tamil Nadu 12th Standard Computer Applications question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Applications Test

1.
How many parameter are required for MYSQLi connect function in PHP ?
2
3
4
5
2.
Which is the not a correct MySQL Function in PHP ?
Mysqli_connect() Function
Mysqli_close() Function
mysqli_select_data() Function
mysqli_affected_rows() Function
3.
How Can we Create a Database Using PHP and MySQL?
mysqli_create_db(“Database Name”)
mysqli_create_db(“Data”)
create_db(“Database Name”)
create_db(“Data”)
4.
which one is correct way, we can retrieve the data in the result set of MySQL using PHP?
mysql_fetch_row.
mysql_fetch_array
mysql_fetch_object
All the above
5.
Which one of the following statements instantiates the mysqli class?
mysqli = new mysqli()
\($\)mysqli = new mysqli()
\($\)mysqli - > new.mysqli()
mysqli - > new.mysqli()
6.
Define mysqli_affected_rows() Function.
7.
Define mysqli_connect_error() Function
8.
What is mysqli_fetch_assoc() Function?
9.
What is web Database?
10.
Write a note PHP MySQL database connection.
11.
12.
Differentiate mysqli_affected_rows( ) Function and mysqli_fetch_assoc( ) Function.
13.
Write is the purpose of MySQLi function available.
14.
Explain MySQLi Queries with examples.
1.
(c)
4
2.
(c)
mysqli_select_data() Function
3.
(a)
mysqli_create_db(“Database Name”)
4.
(d)
All the above
5.
(b)
\($\)mysqli = new mysqli()
6.
1. The mysqli_affected_rows() function returns the number of affected rows in the previous SELECT, INSERT, UPDATE, REPLACE,or DELETE query.
2. Syntax
mysqli_affected_rows( connection);
7.
1.The mysqli_connect_error() function returns the error description from the last connection error, if any.
2.Syntax
mysqli_connect_error( );
8.
1. The mysqli_fetch_assoc() function fetches a result row as an associative array .
2. Syntax
mysqIi_fetch_assoc(result);
9.
1. A Web database is a database application designed to be managed and accessed through the Internet.
2. In other words, the light databases that support the web applications are also known as Web Databases
10.
Database Connections: Accessing MySQL Database, connect to Database Server machine via PHP scripting language using Mysqli_connect() Function.
Syntax:
mysqli_connect("Server Name","User Name","Password","DB Name");
This function requires four parameters to connect to database server. Database Server name, Database username, password and Database Name.
11.
12.
| mysqli_affected rows( ) | mysqli_fetch_assoc( ) |
|---|---|
| It returns the number of affected rows in the prearvious SELECT, INSERT UPDATE, REPLACE, or DELETE query. | It fetches a result rowas an associative aray |
| Return value: An integer >0 indicates the number of rows affected (0 indicates that no records were affected. '-1' indicates that the query returned an error). |
Returns an associative array of strings representing the fetched row. NULL if there are no more rows in result set. |
| Syntax: mysqli_affected_rows (connection); |
Syntax: mysqli fetch_as-soc(result); |
13.
In PHP Scripting language many functions are available for MySQL Database connectivity and executing SQL queries. MySQLi is extension in PHP Scripting language which gives access to the MySQL database. MySQLi extension was introduced version 5.0.0.
The MySQLi extension contains the following important functions which are related to MySQL database connectivity and management.
i) Mysqli_connect() Function
ii) Mysqli_close() Function
iii) Mysqli_query() Function
14.
Performing Queries: The main goal of MySQL and PHP connectivity is to retrieve and manipulate the data from MySQL database server. The SQL query statements are help in PHP MySQL extension to achieve the objective of MySQL and PHP connection. “mysqli_query” is a function, that helps to execute the SQL query statements in PHP scripting language.
Syntax:
mysqli_query(“Connection Object”,“SQL Query”)
Example:
$con=mysqli_connect(“localhost”,“my_user”,“my_password”,“Student_DB”);
$sql=“SELECT student_name,student_age FROM student”;mysqli_query($con,$sql);
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards