How can I define a string with all unique field values ββin MySql with PHP?
I am really trying to get this required output ... Any help would be appreciated.
I have a database like this in MySql:
column_a column_b
int_value_1 string_value_1
int_value_2 string_value_2
int_value_3 string_value_3
int_value_4 string_value_4
int_value_5 string_value_5
int_value_6 string_value_6
... and as a result I require below:
A string or multiple rows that have unique values ββin each column. This row must be unique in every field with every column.
Something like that:
column_a column_b
1st_unique_int_value 1st_unique_string_value
2nd_unique_int_value 2nd_unique_string_value
Now the above rows / rows are completely unique for every field in every column.
I tried GROUP BY
, DISTINCT
and ARRAY_DIFF
, but could not complete this task. Please tell me if you are one of the experts in PHP and MySql programming and can help me along with the demo, as I am a bit new to this exciting world of programming and development.
source to share