| Summary | No search possible because sesha_inventory WHERE sesha_inventory."stock_id" LIKE '%%' |
| Queue | Sesha |
| Queue Version | 1.0.0RC3 |
| Type | Bug |
| State | Resolved |
| Priority | 1. Low |
| Owners | jan (at) horde (dot) org |
| Requester | skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de |
| Created | 2/18/14 (4433 days ago) |
| Due | |
| Updated | 2/24/14 (4427 days ago) |
| Assigned | |
| Resolved | 2/24/14 (4427 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
State ⇒ Resolved
Priority ⇒ 1. Low
commit 842f5376764a0c3946567a76ff69a1c735bc214d
Author: Jan Schneider <jan@horde.org>
Date: Mon Feb 24 15:15:42 2014 +0100
[jan] Don't use LIKE search on inventory ID field (
Bug #12976).And don't build empty search criteria.
sesha/docs/CHANGES | 1 +
sesha/lib/Driver/Rdo.php | 11 ++++++++---
sesha/package.xml | 4 ++--
3 files changed, 11 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/842f5376764a0c3946567a76ff69a1c735bc214d
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ Sesha
Summary ⇒ No search possible because sesha_inventory WHERE sesha_inventory."stock_id" LIKE '%%'
Type ⇒ Bug
State ⇒ Unconfirmed
The SQL query tried to use "stock_id" LIKE '%%', which is:
a) a NOOP, IMHO
b) invalid, because stock_id is INTEGER and LIKE requires character strings,
c) I did not selected "Stock ID" as property to search for,
d) I miss the search string I entered
I also miss the properties I've created, in order to search through them.
========
HORDE: [sesha] SQLSTATE[42883]: Undefined function: 7 ERROR: operator
does not exist: integer ~~ unknown#012LINE 1: ... sesha_inventory
WHERE sesha_inventory."stock_id" LIKE '%%' ...#012
^#012HINT: No operator
matches the given name and argument type(s). You might need to add
explicit type casts.
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist:
integer ~~ unknown LINE 1: ... sesha_inventory WHERE
sesha_inventory."stock_id" LIKE '%%' ... ^ HINT: No operator matches
the given name and argument type(s). You might need to add explicit
type casts.
1. Sesha_View_List->__construct() /var/www/horde/sesha/list.php:49
2. Sesha_View_List->stock() /var/www/horde/sesha/lib/View/List.php:76
3. Sesha_Driver_Rdo->findStock() /var/www/horde/sesha/lib/View/List.php:156
4. iterator_to_array() /var/www/horde/sesha/lib/Driver/Rdo.php:594
5. Horde_Rdo_List->rewind()
6. Horde_Db_Adapter_Base->select() /usr/share/php/Horde/Rdo/List.php:133
7. Horde_Db_Adapter_Base->execute()
/usr/share/php/Horde/Db/Adapter/Base.php:405
8. Sesha_View_List->__construct() /var/www/horde/sesha/list.php:49
9. Sesha_View_List->stock() /var/www/horde/sesha/lib/View/List.php:76
10. Sesha_Driver_Rdo->findStock() /var/www/horde/sesha/lib/View/List.php:156
11. iterator_to_array() /var/www/horde/sesha/lib/Driver/Rdo.php:594
12. Horde_Rdo_List->rewind()
13. Horde_Db_Adapter_Base->select() /usr/share/php/Horde/Rdo/List.php:133
14. Horde_Db_Adapter_Base->execute()
/usr/share/php/Horde/Db/Adapter/Base.php:405
15. PDO->query() /usr/share/php/Horde/Db/Adapter/Base.php:551
Details
The full error message is logged in Horde's log file, and is shown
below only to administrators. Non-administrative users will not see
error details.
Horde_Db_Exception Object
(
[details] =>
[logged] => 1
[_logLevel:protected] => 0
[message:protected] => SQLSTATE[42883]: Undefined function: 7
ERROR: operator does not exist: integer ~~ unknown
LINE 1: ... sesha_inventory WHERE sesha_inventory."stock_id" LIKE '%%' ...
^
HINT: No operator matches the given name and argument type(s). You
might need to add explicit type casts.
[string:Exception:private] =>
[code:protected] => 42883
[file:protected] => /usr/share/php/Horde/Db/Adapter/Base.php
[line:protected] => 555
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /usr/share/php/Horde/Db/Adapter/Base.php
[line] => 405
[function] => execute
[class] => Horde_Db_Adapter_Base
[type] => ->
[args] => Array
(
[0] => SELECT sesha_inventory.stock_id,
sesha_inventory.stock_name, sesha_inventory.note FROM sesha_inventory
WHERE sesha_inventory."stock_id" LIKE ? OR
sesha_inventory."stock_name" LIKE ?
[1] => Array
(
[0] => %%
[1] => %%
)
[2] =>
)
)
[1] => Array
(
[file] => /usr/share/php/Horde/Rdo/List.php
[line] => 133
[function] => select
[class] => Horde_Db_Adapter_Base
[type] => ->
[args] => Array
(
[0] => SELECT sesha_inventory.stock_id,
sesha_inventory.stock_name, sesha_inventory.note FROM sesha_inventory
WHERE sesha_inventory."stock_id" LIKE ? OR
sesha_inventory."stock_name" LIKE ?
[1] => Array
(
[0] => %%
[1] => %%
)
)
)
[2] => Array
(
[function] => rewind
[class] => Horde_Rdo_List
[type] => ->
[args] => Array
(
)
)