git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@49 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+7
-5
@@ -33,11 +33,13 @@ $app->get('/typeqtys', function () use ($app) {
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/categoryitems/:catID', function ($categoryID) use ($app) {
|
||||
$app->get('/ricette/:catID', function ($categoryID) use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
//$mysqlconnetion->connetti();
|
||||
$query = "select ID as ricetta_id, titolo, autore, valutazione, difficolta from ricette where ID_CATEGORIA = " . $categoryID . " order by titolo, autore";
|
||||
$query = "select * from (select ID as ricetta_id, titolo, autore, valutazione, difficolta, " .
|
||||
"(select id from immagini where immagini.id_ricette = ricette.id and published = 1 order by published_date limit 1) as firstImage " .
|
||||
"from ricette where ricette.ID_CATEGORIA = " . $categoryID . " order by titolo, autore) as TMP";
|
||||
$retObj = $mysqlconnetion->queryToObject($query);
|
||||
$mysqlconnetion->disconnetti();
|
||||
|
||||
@@ -48,7 +50,7 @@ $app->get('/categoryitems/:catID', function ($categoryID) use ($app) {
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/categoryitems/:categoryID/mostvote(/:numItems)', function ($categoryID, $numItems = 10) use ($app) {
|
||||
$app->get('/ricette/:categoryID/mostvote(/:numItems)', function ($categoryID, $numItems = 10) use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
//$mysqlconnetion->connetti();
|
||||
@@ -63,7 +65,7 @@ $app->get('/categoryitems/:categoryID/mostvote(/:numItems)', function ($category
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/categoryitems/:categoryID/lastinserted(/:numItems)', function ($categoryID, $numItems = 10) use ($app) {
|
||||
$app->get('/ricette/:categoryID/lastinserted(/:numItems)', function ($categoryID, $numItems = 10) use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
//$mysqlconnetion->connetti();
|
||||
@@ -78,7 +80,7 @@ $app->get('/categoryitems/:categoryID/lastinserted(/:numItems)', function ($cate
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/categoryitems/search/:numItems/:startItem(/:categoryId(/:difficolta(/:titolo)))',
|
||||
$app->get('/ricette/search/:numItems/:startItem(/:categoryId(/:difficolta(/:titolo)))',
|
||||
function ($numItems = 10, $startItem = 0, $categoryId = 0, $difficolta = 0, $titolo = "") use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
|
||||
Reference in New Issue
Block a user