אני מנסה לשלוף את הנתונים האחרונים שנכנסו למסד..
PHP קוד:
<?php
mysql_connect("localhost", "******", "****");
mysql_select_db("*****");
$result = mysql_query("SELECT TOP 2 * FROM tutorials ORDER BY id DESC");
$tutorial_title=$row["title"];
$tutorial_text=$row["the_tutorial"];
$tutorial_user=$row["user_name"];
while($row = mysql_fetch_array($result)){
echo '
<div class="popular_new_tutorials_text">
<div class="tutorials_box">
<span class="tutorial_title">' . $row['title'] . '</span>
<p class="tutorial_text">' . $row['the_tutorial'] . '</p>
<span class="tutorial_user">' . $row['user_name'] . '</span>
</div>
</div>';
}
?>
אני מקבל את השגיאה:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
ניסיתי הכל..
תודה.