From the course: PHP: Object-Oriented Programming with Databases

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

MySQLi methods and properties

MySQLi methods and properties - PHP Tutorial

From the course: PHP: Object-Oriented Programming with Databases

Start my 1-month free trial

MySQLi methods and properties

- [Instructor] Once we have a database connection object, we can then ask that object for information or to perform tasks for us. After all, that's what object properties and methods are designed to do, to ask for information or to perform tasks. Let's see what some of the methods and properties that are available to us are. The database connection object has many properties and methods, but there are really just four which are most frequently used. The first and certainly the one we use the most often is the one to query the database. The procedural version of this uses mysqli_query. The object-oriented version is just simply called query and you're going to see this as a common pattern. What used to be called mysqli_ is now whatever comes after that underscore as the method name. So here we have the database object, we use the arrow notation, the dash and the greater than sign, and then the name of the method we want to call, which in this case is just query. Another common method…

Contents