MySQL PHP String Function database
I want to put $row _hx[' Content_original_autor ' in the database; It is shown by a page of 10, but the repeated display is removed, that is to say $row _hx[' content_original_autor '; If you have the same content, it is not displayed.
Reply to discussion (solution)
Your estimate is to put the value in the array to handle.
Two ways of thinking
1.array_unique de-duplication (for the purpose of leaving the key for the first occurrence of the value) and then using Array_diff to find the difference set of Array_keys
The key is not displayed in the difference set
This method typically takes the data into array processing
2. Build an empty array A, show each time if there is no inside a, add it, and show if the value already exists in a, skip
SQL is grouped by Content_original_autor.
... Group by Content_original_autor
Two ways of thinking
1.array_unique de-duplication (for the purpose of leaving the key for the first occurrence of the value) and then using Array_diff to find the difference set of Array_keys
The key is not displayed in the difference set
This method typically takes the data into array processing
2. Build an empty array A, show each time if there is no inside a, add it, and show if the value already exists in a, skip
I just got this thing, I'm not sure I can keep you in touch, I'll ask you.
$query _HX = "SELECT * from Content_publish GROUP by Content_original_autor ORDER by content_id DESC";
Give it a try