<?php $mysqli = new mysqli(); $mysqli->connect("127.0.0.1", "root","", "mydatabase"); $query = "SELECT productid, name, price FROM product ORDER by name"; $mysqli->query($query); $result->free(); ?>