# \[PHP + MySQL\] Problem with rows

**URL:** <https://forum.kirupa.com/t/php-mysql-problem-with-rows/192178>\
**Category:** Uncategorized\
**Created:** [June 26, 2006, 7:53pm UTC](https://forum.kirupa.com/t/php-mysql-problem-with-rows/192178 "2006-06-26T19:53:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaxza](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zaxza/32/2227_2.png) [@Zaxza](https://forum.kirupa.com/u/Zaxza)\
**Post date:** [June 26, 2006, 7:53pm UTC](https://forum.kirupa.com/t/php-mysql-problem-with-rows/192178/1 "2006-06-26T19:53:35Z")

</div>

I’m making a news script, and when it comes to displaying hte latest news article only i keep having problems.

[SIZE=1] **This is my script so far:** [/SIZE]  
[SIZE=2]

```php
<p class="header">LatestNews</p><br>
<span class="title"><? $query ="SELECT * FROM news ORDER BY dtime DESK LIMIT 1";
 $result = mysql_query($query);
 while ($rows = mysql_fetch_row($result)){
echo $rows['title'] . "</span><span class=date>" . $rows['dtime'] . "</span><br>" . $rows['content'];
}?>

```

[/SIZE]  
When i use it this comes up  
[SIZE=1]  
“ **Warning** : mysql\_fetch\_row(): supplied argument is not a valid MySQL result resource in **/home/www/maive.co.uk/index.php** on line \*\*24”  
\*\*[SIZE=2]  
Can anyone please explain to me what is happening, and how do i fix it. Also am i going about it the wrong way??

Thanks for your help, Zaxza…  
[/SIZE][/SIZE]
