From 0c73ea108eda89ddcd3f337e2df675f7538f9a12 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2016 03:38:45 +0100 Subject: [PATCH] #70 tbc item api call implemented, fixed account available sql --- mojotrollz/api/api_mojotrollz.php | 3 +++ mojotrollz/api/qq/MOJO_ACCOUNT_AVAILABLE.php | 2 +- mojotrollz/api/qq/TBC_ITEM.php | 8 ++++++++ mojotrollz/sql/mysql/system_api.sql | 5 ++++- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 mojotrollz/api/qq/TBC_ITEM.php diff --git a/mojotrollz/api/api_mojotrollz.php b/mojotrollz/api/api_mojotrollz.php index 95cb3ec..49e5b36 100644 --- a/mojotrollz/api/api_mojotrollz.php +++ b/mojotrollz/api/api_mojotrollz.php @@ -29,4 +29,7 @@ class api_mojotrollz extends \SYSTEM\API\api_system { return \SQL\MOJO_ACCOUNT_AVAILABLE::Q1(array($username), new \SQL\mangos_realm())['count'] == 0;} private static function wow_account_register($username,$email,$password){ return \SQL\MOJO_ACCOUNT_REGISTER::QI(array($username,$email,$password), new \SQL\mangos_realm());} + + public static function call_tbc_action_item($id){ + return \JsonResult::toString(\SQL\TBC_ITEM::Q1(array($id),new \SQL\mangos_one_world()));} } \ No newline at end of file diff --git a/mojotrollz/api/qq/MOJO_ACCOUNT_AVAILABLE.php b/mojotrollz/api/qq/MOJO_ACCOUNT_AVAILABLE.php index bc6ebed..04abd11 100644 --- a/mojotrollz/api/qq/MOJO_ACCOUNT_AVAILABLE.php +++ b/mojotrollz/api/qq/MOJO_ACCOUNT_AVAILABLE.php @@ -3,6 +3,6 @@ namespace SQL; class MOJO_ACCOUNT_AVAILABLE extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} public static function mysql(){return -'SELECT count(username) as count FROM account WHERE username = UPPER(?);'; +'SELECT count(username) as count FROM account WHERE UPPER(username) = UPPER(?);'; } } \ No newline at end of file diff --git a/mojotrollz/api/qq/TBC_ITEM.php b/mojotrollz/api/qq/TBC_ITEM.php new file mode 100644 index 0000000..b5f7baf --- /dev/null +++ b/mojotrollz/api/qq/TBC_ITEM.php @@ -0,0 +1,8 @@ +