Jump to content

Help with Link code


rseigel

Recommended Posts

I'm using the following code:

 

$result = mysql_query('SELECT * FROM tmp_price_compare WHERE tmp_price_compare.supplier_reference NOT IN (SELECT product_supplier_reference FROM product_supplier)')
or die(mysql_error());
echo "NEW PRODUCTS<br /><br />";
while($row = mysql_fetch_array($result))
 {
 echo "<a href=https://www.mysupplier.com/item/item.lasso?dsc2=" . $row['supplier_reference'] . echo $row['supplier_reference'] . echo"</a><br />";
 }

 

The SELECT works perfectly and results are as expected.

 

I'm having trouble getting the link coded correctly.

 

I'm sure it's something silly. I was hoping someone with more experience than I could spot it.

 

Thanks,

 

Ron

Link to comment
Share on other sites

Thanks Jessica. You are always awesome at pointing me in the right direction without spoon feeding it. Great way to learn. :)

 

The not closing the opening <a> tag was the one that I was overlooking.

 

Here's the final code that works:

 

while($row = mysql_fetch_array($result))
 {
 echo "<a href=https://www.bnfusa.com/item/item.lasso?dsc2=";
 echo $row['supplier_reference'];
 echo ">";
 echo $row['supplier_reference'];
 echo"</a><br />";
 }

 

Thanks again.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.