git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@50 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+6
-1
@@ -169,11 +169,16 @@ $app->get('/ricetta/header/:itemID', function ($itemID) use ($app) {
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
$query = "UPDATE ricette Set valutazione = valutazione + 1 WHERE ricette.ID = " . $itemID;
|
||||
$mysqlconnetion->executeQuery($query);
|
||||
$query = "SELECT id_categoria, categorie.name AS categoria_name, ricette.ID AS ricetta_id, titolo, procedimento, autore, link_fonte, link_youtube, valutazione FROM ricette INNER JOIN categorie ON categorie.ID = ricette.id_categoria WHERE ricette.ID = " . $itemID;
|
||||
$query = "SELECT ID from immagini WHERE published = 1 AND ID_RICETTE = " . $itemID;
|
||||
$photos = $mysqlconnetion->queryToObject($query);
|
||||
$query = "SELECT id_categoria, categorie.name AS categoria_name, ricette.ID AS ricetta_id, " .
|
||||
"titolo, procedimento, autore, link_fonte, link_youtube, valutazione FROM ricette " .
|
||||
"INNER JOIN categorie ON categorie.ID = ricette.id_categoria WHERE ricette.ID = " . $itemID;
|
||||
$retObj = $mysqlconnetion->queryToObject($query);
|
||||
$retObj[0]["titolo"] = html_entity_decode($retObj[0]["titolo"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
|
||||
$retObj[0]["procedimento"] = html_entity_decode($retObj[0]["procedimento"], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
|
||||
$data = $retObj[0]["link_youtube"];
|
||||
$retObj[0]["foto"] = $photos;
|
||||
$output = array();
|
||||
if ($data != "") {
|
||||
$d = explode(";", $data);
|
||||
|
||||
Reference in New Issue
Block a user