git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@58 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+18
-19
@@ -33,6 +33,24 @@ $app->get('/typeqtys', function () use ($app) {
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/ricette/authors(/:startWith)', function ($startWith = "") use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
$query = "select distinct autore from ricette"
|
||||
. " where 1 = 1";
|
||||
|
||||
if ($startWith != null && $startWith != "") {
|
||||
$query = $query . " AND autore like '%" . $startWith . "%'";
|
||||
}
|
||||
|
||||
$query = $query . " order by autore";
|
||||
|
||||
$retObj = $mysqlconnetion->queryToObject($query);
|
||||
$mysqlconnetion->disconnetti();
|
||||
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/ricette/:catID', function ($categoryID) use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
@@ -115,25 +133,6 @@ $app->get('/ricette/search/:numItems/:startItem(/:categoryId(/:difficolta(/:tito
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/ricette/authors(/:startWith)',
|
||||
function ($startWith = "") use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
$query = "select distinct autore from ricette"
|
||||
. " where 1 = 1";
|
||||
|
||||
if ($startWith != null && $startWith != "") {
|
||||
$query = $query . " AND autore like '%" . $startWith . "%'";
|
||||
}
|
||||
|
||||
$query = $query . " order by autore";
|
||||
|
||||
$retObj = $mysqlconnetion->queryToObject($query);
|
||||
$mysqlconnetion->disconnetti();
|
||||
|
||||
returnJson($app, $callbackFn, $retObj);
|
||||
});
|
||||
|
||||
$app->get('/ricetta/body/:itemID', function ($itemID) use ($app) {
|
||||
$callbackFn = $app->request()->get('callback');
|
||||
$mysqlconnetion = new MysqlClass;
|
||||
|
||||
Reference in New Issue
Block a user