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:

days between two date:
SELECT DATEDIFF('2006-07-10','2006-06-01');
Related Posts Plugin for WordPress, Blogger...

Popular Posts

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

Technicals details select

source of program, dropdowns

medicals dropdown

for programmers dropdown

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

:: Useful web links List