Jump to content

Recommended Posts

I have a shopping cart and I'm trying to add Previous and Next Product buttons. The next prod works fine but the previous is not.

SELECT p.product_Name, p.product_ID, i.prdctImage_FileName, it.imgType_Folder
FROM tbl_products p
	INNER JOIN tbl_skus S
	ON p.product_ID = S.SKU_ProductID
	LEFT JOIN tbl_prdtimages i
	ON p.product_ID = i.prdctImage_ProductID 
	LEFT JOIN tbl_list_imagetypes it
	ON i.prdctImage_ImgTypeID = it.imgType_ID 
WHERE 
	it.imgType_SortOrder = 1 AND i.prdctImage_ImgTypeID = 1 AND p.product_OnWeb = 1 AND S.SKU_Stock > 0 AND p.product_ID < '2326' LIMIT 1 

 

if product_ID > '2326' it will return 2327 which is correct. if product_ID < '2326' it will return 429, which should be 2325.

Link to comment
https://forums.phpfreaks.com/topic/211462-less-than-operator-not-working-right/
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.