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:
Or is there atleast an easy way to get rid of the duplicates without having to do it one by one?
row = 'john';
row = 'doe';
row['first'] = 'john';
row['last] = 'doe'
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.)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread