SQL queries

01) join query:
select     products.productId, products.ProductName, products.IsApproved, products.ProductCode, products.ProductImage, products.ProductDescription, products.ProductCost,
        categorymaster.CategoryId, categorymaster.CategoryName
       
      FROM     products  INNER JOIN categorymaster  ON products.productId = categorymaster.CategoryId  where CategoryId='$id' and products.IsApproved='1' order by ProductId LIMIT $offset, $rowsPerPage";


02) count no of days in a month:
SELECT day(last_day('2011-02-1'));

today date:
SELECT DAY(CURRENT_DATE);

days between two date:
SELECT DATEDIFF('2006-07-10','2006-06-01');

Comments

  1. I just take a peek and I discovered your post. I find it impressive and incredible. Big thanks for sharing.

    Shasing

    ReplyDelete

Post a Comment

please enter true details, otherwise do not waste your time and our space

Related Posts Plugin for WordPress, Blogger...

Popular Posts

மூக்குத்தி அணிவது ஏன்?

UI Certifications Q & A

Technicals details select

Do's and Don'ts - Central Pollution Control Board (CPCB),

for programmers dropdown

medicals dropdown

:: Useful web links List