Solved

mysql

Posted on 2013-01-29
3
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

690 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