nightkarnation Posted September 25, 2008 Share Posted September 25, 2008 Hello...Im wondering how can I code a query where i only want values that are not repeated... Lets say: $dataDate = mysql_query("SELECT date FROM alls_data ORDER BY `alls_data`.`date` ASC"); Here the query will result of some dates...September 18, September 17, September 16, September 16, September 16, September 15, etc, etc... And there are repeated dates...I only want just once each day, Any ideas? Thanx in advance for ur reply, Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/125732-solved-mysql-select-casequery-only-1-when-repeated-value/ Share on other sites More sharing options...
Maq Posted September 25, 2008 Share Posted September 25, 2008 I forget the exact syntax but something like: SELECT DISTINCT date Quote Link to comment https://forums.phpfreaks.com/topic/125732-solved-mysql-select-casequery-only-1-when-repeated-value/#findComment-650151 Share on other sites More sharing options...
nightkarnation Posted September 25, 2008 Author Share Posted September 25, 2008 Cool it works perfectly, Thanx man! SELECT DISTINCT date FROM alls_data ORDER BY `alls_data`.`date` ASC Quote Link to comment https://forums.phpfreaks.com/topic/125732-solved-mysql-select-casequery-only-1-when-repeated-value/#findComment-650164 Share on other sites More sharing options...
Maq Posted September 25, 2008 Share Posted September 25, 2008 NP, glad I could help! Quote Link to comment https://forums.phpfreaks.com/topic/125732-solved-mysql-select-casequery-only-1-when-repeated-value/#findComment-650166 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.