Results 1 to 5 of 5
July 23rd, 2003, 11:06 AM #1
Just wondered if anyone could pick fault with this code... potential problems etc?
// Find buy_url from variable item //
$query = mysql_query("SELECT item_buy_url FROM mytable WHERE item = '$item");
$rows = mysql_num_rows($query);
while ($url = mysql_fetch_array($query))
$go = $url['item_buy_url']);
// determine if a valid item was passed and redirect accordingly //
if($rows <> 1)
July 23rd, 2003, 11:54 AM #2
at a glance, the PHP code all looks fine.
However, if I understand your intentions for this correctly, which is to redirect to an affiliate link, there's no need to put the afsrc parameter on there.
You want to put the afsrc=1 parameter on the link that calls this:
That's the visible link that gets clicked and the one that needs the afsrc label to be identified as an affiliate link.
July 23rd, 2003, 02:13 PM #3
Hi Scott... Long time no speaky
[This message was edited by Tj© on July 23, 2003 at 05:51 PM.]
July 23rd, 2003, 03:20 PM #4
if you are going to
if($rows <> 1)
you should SELECT DISTINCT...
"The greatest good you can do for another is not just to share your riches, but to reveal to him his own." – Benjamin Disraeli
Ford Fox-body Owners Club -- http://www.ford-fox.org
July 23rd, 2003, 04:45 PM #5
yeah, I was gonna do a limit 1 Ty both
By Knothead in forum Programming / Datafeeds / ToolsReplies: 9Last Post: December 29th, 2006, 07:08 PM
By trev0006 in forum Commission Junction - CJReplies: 0Last Post: October 27th, 2006, 04:58 AM
By Donuts in forum Programming / Datafeeds / ToolsReplies: 3Last Post: December 13th, 2005, 01:04 PM
By dak142 in forum Programming / Datafeeds / ToolsReplies: 11Last Post: April 13th, 2004, 07:29 PM