ellor.
so i am trying to get data from database using mysql. (im old minded ye.)
so error is
Notice: Trying to get property of non-object in C:\xampp\htdocs\odev\index.php on line 91
fetch code:
so i am trying to get data from database using mysql. (im old minded ye.)
so error is
Notice: Trying to get property of non-object in C:\xampp\htdocs\odev\index.php on line 91
fetch code:
PHP:
<div class="row text-center">
<?php require_once("ayarlar/ayar.php"); $sql = "SELECT * FROM yemekler ORDER BY id DESC";
$result = mysql_query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo ' <div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<img src=" '. $row["resimlink"] . '" alt="">
<div class="caption">
<h3> ' . ucwords($row["ad"]) . ' </h3>
<p>' . $row['yore'] . ' yöresine ait muhteşem yemek! </p>
<p>
<a href="http://localhost/odev/yemek.php?id=' . $row["id"] . '" class="btn btn-primary">Buy Now!</a> <a href="#" class="btn btn-default">More Info</a>
</p>
</div>
</div>
</div>';}}?>