search bar now working

This commit is contained in:
Mann Patel
2025-03-29 17:28:09 -06:00
parent 91ec43627a
commit 2e77ef49f4
12 changed files with 687 additions and 71 deletions

View File

@@ -33,12 +33,12 @@ exports.getAllProducts = async (req, res) => {
I.URL AS ProductImage,
C.Name AS Category
FROM Product P
LEFT JOIN
(SELECT ProductID, URL FROM Image_URL LIMIT 1) I ON P.ProductID = I.ProductID
JOIN Image_URL I ON p.ProductID = i.ProductID
JOIN User U ON P.UserID = U.UserID
JOIN Category C ON P.CategoryID = C.CategoryID;
`);
console.log(data);
res.json({
success: true,
message: "Products fetched successfully",