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: 16/10/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 Close function in PHP ?
1
2
3
5
2.
Which version of PHP supports MySQLi functions ?
Version 2.0
Version 3.0
Version 4.0
Version 5.0
3.
How many parameter are required for MYSQLi query function in PHP ?
2
3
4
5
4.
How many parameter are required for MYSQLi connect function in PHP ?
2
3
4
5
5.
Which one of the following statements instantiates the mysqli class?
mysqli = new mysqli()
\($\)mysqli = new mysqli()
\($\)mysqli - > new.mysqli()
mysqli - > new.mysqli()
6.
What is MySQLi?
7.
Define mysqli_affected_rows() Function.
8.
What is web Database?
9.
What is Connection string?
10.
Difference between Connection and Close function?
11.
What are the MySQLi function available PHP?
12.
13.
Differentiate mysqli_affected_rows( ) Function and mysqli_fetch_assoc( ) Function.
14.
Write the Syntax for MySQLi Queries.
15.
Write a short note on parameters of mysqli_connect( ) function?
16.
Explain MySQLi Queries with examples.
17.
Discuss in detail about MySQL functions with example.
18.
Connect function requires ___________ number of parameters to connect to database server.
19.
______is extension in PHP scripting language which gives access to the MYSQL database.
20.
MySQLi extension was introduced version__________
21.
SQL stands __________
22.
RDMS stands_________
23.
a) TRUNCATE
b) SELECT
c) UPDATE
d) INSERT
24.
a) MySQL
b) Java
c) DB2
d) Oracle
1.
(a)
1
2.
(d)
Version 5.0
3.
(a)
2
4.
(c)
4
5.
(b)
\($\)mysqli = new mysqli()
6.
MySQLi is extension in PHP scripting language which gives access to the MYSQL database.
7.
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);
8.
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
9.
(i) In computing, a connection string is a string that specifies information about a data source and the means of connected to it.
(ii) It is passed in code to underlying driver or provider in order to initiate the connection.
10.
| Connection function | Close function |
|---|---|
| 1) Before accessing MYSQL Database, connect to Database Server machine via PHP scripting language using Mysqli_connect() Function. | Mysqli_close() Function is used to close an existing opened database connection between PHP scripting and MySQL Database Server. |
| 2) This function requires 4 parameters | This function requires only one parameter. |
11.
(i) Mysqli_connect() Function
(ii) Mysqli_close() Function
(iii) Mysqli_query() Function
12.
13.
| 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); |
14.
Syntax:
mysqli_query("Connection Object","SQL Query")
15.
(i) Four Parameters are used to connect to the Database server.
(ii) They are
1.$ servername -> Database Server server IP address
2.$ susername -> Database Server User Name
3.$ password -> Database Server Password
4.$ DB_Name -> Database Name
16.
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);
17.
MySQL function in PHP:
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
(i) Database Connections:
Before 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 anda Database Name.
(ii) Managing Database Connections :
The below code describes managing database connection methods and features.
The mysqli_connect function uses these variables to connect Database server to PHP. If connection gets fail, output will be printed with MySQL error code. Otherwise connection is success.
(iii) 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 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:
Closing Connection :
mysqli_close() Function is used to close an existing opened database connection between PHP scripting and MySQL Database Server.
18.
( )
four
19.
( )
MySQLi
20.
( )
5.0.0
21.
( )
Structure query language
22.
( )
Relational Database Management System
23.
TRUNCATE
24.
Java
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