|
-
Select * Returns duplicate data
I'm using a MySQL database, and I was wondering, Is there a way to use Select * from a table and not receive duplicates.
Duplicates as in:
Code:
row[0] = 'john';
row[1] = 'doe';
row['first'] = 'john';
row['last] = 'doe'
Or is there atleast an easy way to get rid of the duplicates without having to do it one by one?
-
if you're using PHP, you can use the second parameter of mysql_fetch_array() to specify the $result_type of MYSQL_ASSOC, MYSQL_NUM or MYSQL_BOTH.
-
Wooowww, you are my hero right now. Thanks, that's perfect
-
Use mysql_fetch_assoc() instead. It returns only name associative values. (mysql_fetch_row() will return only numerics.)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks