I'm new to OOP and just trying to migrate from mysql_, but I'm running into some issues while migrating.
$konek = new PDO('mysql:host=localhost;dbname=mydatabase', root, root);$hasil = $konek->query("SELECT * FROM `tabel`");
while ($data = $hasil->fetch_object()) {
echo '<td>'.$data->something.'</td>';}
It doesn't work or show an error, but when I replace the first line with mysqli it works:
konek = new mysqli('localhost','root','root','mydatabase');
Any help would be really appreciated.