SQL: Select table entries with the same value
Let’s say you got a table with lots of entries that have the same value and you want to safe each entry in an array even if it’s a “duplicate”, you can do it with a simple SQL query:
$query = $db->query("SELECT * FROM $db->tablename where exists ( SELECT tablerow_name FROM $db->tablename) ") ;
I hope that helps a bit
Like our posts? Then subscribe via Mail:
Similar Posts:
- Convert multidimensional array into array
- HowTo print array values
- Apache 403 Forbidden Linux – Solution
- VBulletin Email Thread Subscription
- Duplicate entry ‘127′ for key 1
Socialize:
|
|











Leave your response!