Adeus33
08-22-2006, 03:51 AM
Hello, I have a MYSQL problem I can't seem to figure out. It seems like something simple but alas I can not find the error.
I have a link which opens a new browser window. The link itself looks like this;
<a href=\"JavaScript:goVisitSite('http://www.website.com/view_product.php?iid=$row[0]')\">View Product Page</a>
$row[0] being the item's ID.
The page it opens has this query;
$query = ("SELECT * FROM product WHERE product.id = {$_GET['iid']}");
$result = @mysql_query ($query);
$row = @mysql_fetch_array ($result,MYSQL_BOTH);
This code works fine for items with numerical values (123456) but does not load data for items with letters in the ID (E12345).
If anyone can help me I would appreciate it very much.
I have a link which opens a new browser window. The link itself looks like this;
<a href=\"JavaScript:goVisitSite('http://www.website.com/view_product.php?iid=$row[0]')\">View Product Page</a>
$row[0] being the item's ID.
The page it opens has this query;
$query = ("SELECT * FROM product WHERE product.id = {$_GET['iid']}");
$result = @mysql_query ($query);
$row = @mysql_fetch_array ($result,MYSQL_BOTH);
This code works fine for items with numerical values (123456) but does not load data for items with letters in the ID (E12345).
If anyone can help me I would appreciate it very much.