Solved

mysql

Posted on 2013-01-29
3
175 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
Comment Utility
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
Comment Utility
i will give that a go thanks
0
 
LVL 2

Author Comment

by:beridius
Comment Utility
thanks that works
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now