I have links on my webpage like this: <http://test.com/index.php?function=news&id=88>

So whenever I put a ' after 88, I get the following error: Warning: mysql\_fetch\_row() expects parameter 1 to be resource, boolean given in ... line 588

So I read about mysql\_real\_escape\_string(), but I'm getting the ID not posting and I have no clue how should I prevent getting this error. 

```
function news()
{
$query = mysql_query("SELECT * FROM news WHERE id=".$_GET['id']."");
while($news = mysql_fetch_row($query)) 
{
    ...
}
}

```