-
What is the purpose of CodeIgniter's Query Builder class?
- A) To build and execute SQL queries
- B) To manage database connections
- C) To handle form submissions
- D) To generate HTML forms
Answer: A) To build and execute SQL queries
-
Which method is used to select data from a database using CodeIgniter's Query Builder?
- A)
select()
- B)
get()
- C)
query()
- D)
fetch()
Answer: B)
get()
- A)
-
How do you specify a table to select data from using CodeIgniter's Query Builder?
- A) By passing the table name as an argument to the
select()
method - B) By using the
from()
method - C) By calling the
table()
method - D) By using the
join()
method
Answer: B) By using the
from()
method - A) By passing the table name as an argument to the
-
Which method is used to add a WHERE clause to a CodeIgniter query?
- A)
where()
- B)
select()
- C)
from()
- D)
get()
Answer: A)
where()
- A)
-
What is the purpose of CodeIgniter's Pagination library?
- A) To handle form submissions
- B) To manage user authentication
- C) To split large sets of data into multiple pages
- D) To generate HTML forms
Answer: C) To split large sets of data into multiple pages
-
How do you load the Pagination library in a CodeIgniter controller?
- A)
$this->load->library('pagination')
- B)
$this->pagination->load()
- C)
$this->pagination->library('pagination')
- D)
$this->library('pagination')
Answer: A)
$this->load->library('pagination')
- A)
-
Which method is used to initialize pagination in CodeIgniter?
- A)
initialize()
- B)
setup()
- C)
config()
- D)
paginate()
Answer: A)
initialize()
- A)
-
How do you generate pagination links in a CodeIgniter view?
- A) By calling the
generate_links()
method - B) By using the
pagination_links()
function - C) By accessing the
$pagination_links
variable - D) By using the
create_links()
function
Answer: D) By using the
create_links()
function - A) By calling the
-
Which of the following methods is used to limit the number of results in a CodeIgniter query?
- A)
limit()
- B)
offset()
- C)
row()
- D)
result()
Answer: A)
limit()
- A)
-
What is the purpose of CodeIgniter's File Upload class?
- A) To manage database connections
- B) To handle form submissions
- C) To upload files to the server
- D) To generate HTML forms
Answer: C) To upload files to the server
Comments