$rows = $wpdb->get_results($wpdb->prepare(
WHERE meta_key LIKE %s
AND meta_value = %s
'images_%_type', // meta_name: $ParentName_$RowNumber_$ChildName
'type_3' // meta_value: 'type_3' for example
then i get also posts they are not published (e.g. revisions).
Any ideas how can I modify the query that get only published posts?