Jquery – Uncaught TypeError: Cannot use ‘in’ operator to search for ‘324’ in

You have a JSON string, not an object. Tell jQuery that you expect a JSON response and it will parse it for you. Either use $.getJSON instead of $.get, or pass the dataType argument to $.get: $.get( ‘index.php?r=admin/post/ajax’, {“parentCatId”:parentCatId}, function(data){ $.each(data, function(key, value){ console.log(key + “:” + value) }) }, ‘json’ );

Matching all values in IN clause

You can do something like this: select ItemID from ItemCategory where CategoryID in (5,6,7,8) <– de-dupe these before building IN clause group by ItemID having count(distinct CategoryID) = 4 <–this is the count of unique items in IN clause above If you provide your schema and some sample data, I can provide a more relevant … Read more

yii CPasswordHelper: hashPassword and verifyPassword

CPasswordHelper works like PHP’s functions password_hash() and password_verify(), they are wrappers around the crypt() function. When you generate a BCrypt hash, you will get a string of 60 characters, containing the salt. // Hash a new password for storing in the database. $hashToStoreInDb = password_hash($password, PASSWORD_BCRYPT); The variable $hashToStoreInDb will now contain a hash-value like … Read more