• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

mysql

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
beridius
Asked:
beridius
  • 2
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
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
 
beridiusAuthor Commented:
i will give that a go thanks
0
 
beridiusAuthor Commented:
thanks that works
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now