Posts

Showing posts from August, 2018

TOP MOST USEFUL MYSQLI_QUERIES || WHICH IS USE EVERY PROJECT TO PERFORM SOME DIFFERENT TASK.

Image
SELECT * FROM `products`; SELECT productname, price FROM products; SELECT productname, price FROM products WHERE id=1; SELECT * FROM `products` ORDER BY id DESC; SELECT * FROM `products` ORDER BY productname ASC; SELECT * FROM `products` LIMIT 0,3;                               form which index , no of records SELECT * FROM products ORDER BY price DESC LIMIT 0,2; SELECT * FROM products WHERE city = 'cityname'; SELECT * FROM products WHERE price >= 'priceamout'; SELECT * FROM products WHERE price >= '20000' AND price <='50000' SELECT * FROM products WHERE city = 'city' AND price >= 'priceamount'; SELECT * FROM `products` WHERE city IN ('Bhopal','Indore'); SELECT * FROM `products` WHERE city!='gwalior' SELECT * FROM `products` WHERE city NOT IN ('Bhopal','Indore'); ALTER TABLE `tablename` ADD `coulmname` DATATYPE(length) property; ALTER TABLE products A...