ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

The variable that is a handle to a database object is . . . . . . . .

Answer & Solution
Correct Answer: Option A
This question asks about a special variable that's used to keep track of a database. Think of it like a name tag for your database!

The correct answer is Option A: $dbh. Here's why:

* $dbh is a common convention in PHP code to represent the database handle. It stands for "database handle".

* $sth (Option B) is usually used for a prepared statement handle, which is like a template for sending commands to the database.

* $fh (Option C) and $h (Option D) are not commonly used for database handles. They might be used for other purposes, like file handles.

So, when you see $dbh in code, you know it's referring to your database connection!
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.