PHP GUID problem

Hello.

I want to put my website article URL’s working with GUIDs instead ID. In MySQL DB side, everything is OK. But not in PHP:

If the URL is http://localhost/mrn_site/?guid=98a0f032-2d41-11e3-8d9d-001e333a1bf0 - I get an “parameter to be resourced” error.

If the URL is http://localhost/mrn_site/?guid=‘98a0f032-2d41-11e3-8d9d-001e333a1bf0’ - the result is normal.

So, I thing I need to quote GUID. How to do that?

My code:
[php]<?php
{
$query = “SELECT * FROM news WHERE destaque=‘Sim’ and publicado=‘sim’ ORDER BY news_id DESC LIMIT 4”;
$result = mysql_query($query);

while ($row = mysql_fetch_array($result))

{
echo “

”;
echo “<a href=’?guid=”.$row[“news_guid”]." class=‘div-link’>";
echo “
”;
//imagem
echo “
<img src=’”.$row[‘news_image’]."’ title=’".$row[“news_title”]."’ alt=’".$row[“news_title”]."’/>
";
//texto
echo “

”.$row[“news_title”]."

";
echo “

”.$row[“news_subtitle”]."

";
echo “";
echo “
”;
echo “”;
echo “
”;
}[/php]

Thank you in advance!

Sponsor our Newsletter | Privacy Policy | Terms of Service