Solved

mysql

Posted on 2013-01-29
3
177 Views
Last Modified: 2013-01-29
is there away of count the rows but exclude if the row contains the same information eg

2013-01-29 09:25:07 	  	25 	07111111111 	SIP/119 		1300000007.88830
2013-01-29 09:25:07 	  	25 	07111111111 	SIP/119 		1300000007.88830
2013-01-29 09:25:07 	  	25 	07111111111 	SIP/119 		1300000007.88830
2013-01-29 09:36:50 	  	47 	07222222222 	SIP/119 		1311111110.89099
2013-01-29 09:36:50 	  	47 	07222222222 	SIP/119 		1311111110.89099
2013-01-29 09:36:50 	  	47 	07222222222 	SIP/119 		1311111110.89099
2013-01-29 09:41:36 	  	11 	07333333333 	SIP/119 		1322222496.89209
2013-01-29 09:41:36 	  	11 	07333333333 	SIP/119 		1322222496.89209
2013-01-29 09:41:36 	  	11 	07333333333 	SIP/119 		1322222496.89209
2013-01-29 09:41:36 	  	11 	07333333333 	SIP/119 		1322222496.89209

Open in new window

would count as 3
0
Comment
Question by:beridius
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38830412
do u want it to distinct rows in the query or in the php code once retrieve the data?
you can also use group by, for instance:

select * from your-table group by the-field
0
 
LVL 2

Author Comment

by:beridius
ID: 38830426
i will give that a go thanks
0
 
LVL 2

Author Comment

by:beridius
ID: 38830433
thanks that works
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question