php - select distinct works on one table but not the other -


i have bunch of tables in 1 database. using 3 testing , have created following sqls

select distinct bb_users.user_nickname bb_users  join bucket_list on bb_users.username = bucket_list.author  bucket_list.status=(:s) order bucket_list.author asc limit 0, 30 

this returns user_nickname bb_users table , works expected

i use following on table named music

select distinct bb_users.user_nickname bb_users  join music on bb_users.username = music.author  music.status=(:s) order music.author asc limit 0, 30 

i run sql query prepared statement:

//$sql ->the sql statements above $prep=$conn->prepare($sql);  $exec=$prep->execute(array(":s"=>"active"));  var_dump($exec); while($fetch=$prep->fetch(pdo::fetch_assoc)){     //do stuff } 

the music tables outputs nothing , using php pdo execute method returns false

both of these lines of code dynamically created confused how 1 works , other not

any appreciated

changed collation code utf8_unicode_ci utf8_general_ci


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -