Author Archives: phpspiderblog

How to find duplicate rows from query ?

If you want to find duplicate rows from your table use the following query. SELECT column1,column2 COUNT(*) users GROUP BY column1, column2 HAVING COUNT(*) > 1SELECT column1,column2 COUNT(*) users GROUP BY column1, column2 HAVING COUNT(*) > 1 Following are steps : To test the above query on sample table Step1 : First of all you need a table (Assuming you have… Read More »

How to display image from database in PHP?

Step1 : Fetch/Retrieve the image from datbase using database functions. Step2 : Now use the image tag below. <?php $convertedImage =’CONVERTED_IMAGE_FROM_DB’; ?> <img src="data:image/jpg|gif|png;charset=utf8;base64,$convertedImage" /> jpg/gif/png depends on the type of image.<?php $convertedImage =’CONVERTED_IMAGE_FROM_DB’; ?> <img src="data:image/jpg|gif|png;charset=utf8;base64,$convertedImage" /> jpg/gif/png depends on the type of image.