Le Ricette di Claretta

get_results( “SELECT id, titolo FROM wp_ricette ORDER BY data ASC;” );
$iddaurl = $_GET[‘id’];
if($iddaurl == “about”) {
$thisricet->id = “about”;
$thisricet->img = “presentazione.jpg”;
} else {
$iddaurl = intval($iddaurl);
if($iddaurl != 0)
{
$thisricet = $wpdb->get_row($wpdb->prepare( ‘SELECT id, titolo, img FROM wp_ricette WHERE id = %d;’ , $iddaurl ));
} else {
$thisricet = $wpdb->get_row( ‘SELECT id, titolo, img FROM wp_ricette ORDER BY data DESC LIMIT 1;’);
}
}
?>