Do you really need to use a sql query? You can use the get_posts function. For example:
$posts = get_posts(array(
'numberposts' => -1,
'nopaging' => true,
'post_type' => 'postitem',
'post_status' => 'publish',
'lang' => 'it',
));
Do you really need to use a sql query? You can use the get_posts function. For example:
$posts = get_posts(array(
'numberposts' => -1,
'nopaging' => true,
'post_type' => 'postitem',
'post_status' => 'publish',
'lang' => 'it',
));