Nathan Gray
b0a8cebc69
Avoid some more ambiguous columns
2015-04-29 16:31:48 +00:00
Ralf Becker
e87c0dfb1a
* ProjectManager/PostgreSQL: fix SQL error in project-list caused by new resources column
...
fix columns containing commas as part of function calls getting split incorrect in fix_group_by_columns
2015-02-16 10:22:23 +00:00
Hadi Nategh
81cc0f35f7
Convert ambiguous column to tablename.column name
2014-12-15 16:57:45 +00:00
Ralf Becker
b537c3963d
fix IDE warnings
2014-10-01 19:05:33 +00:00
Ralf Becker
9e71712e2f
fix indention
2014-09-04 08:27:45 +00:00
Nathan Gray
612b5bf34f
Fix searching for a space gives database error
...
(To actually search for a space, use quotes)
2014-03-11 18:26:40 +00:00
Ralf Becker
a5a0024545
only search custom fields, if extending class does not set this->columns_to_search explicit, also fixed IDE warnings
2014-03-03 11:45:38 +00:00
Ralf Becker
57c2c913d1
fixed new emailadmin stuff to work with postgreSQL
2013-11-29 01:50:49 +00:00
Ralf Becker
6f5207953e
* PostgreSQL/ProjectManager: fixed SQL error "pm_id is ambigues" when accessing /apps/projectmanager via filemanager
...
instead of aliased primary key, we have to use original column incl. table-name as alias is ambigues
2013-10-14 07:53:13 +00:00
Ralf Becker
a4ec8796af
* Timesheet/PostgreSQL: fix SQL error when selecting a timerange
2013-08-29 10:59:00 +00:00
Ralf Becker
fabc787fc3
* ProjectManager: fix SQL error if searching for string containing numbers and underscore or percent
...
skip user-wildcards (*,?) in is_numeric test, but not SQL wildcards, which get escaped and give sql-error
2013-08-14 08:02:23 +00:00
Ralf Becker
ff536e6f1c
* PostgreSQL/Addressbook: fix SQL error in addressbook by organisation and department
2013-08-06 12:09:11 +00:00
Ralf Becker
d483b2a564
* PostgreSQL/ProjectManager/InfoLog: invalid SQL opening a new entry InfoLog entry
...
can not "SELECT * FROM table ... GROUP BY *" has to be "SELECT table.* ... FROM table GROUP BY table.*"
2013-07-26 06:57:23 +00:00
Ralf Becker
78f032e063
fixed DISTINCT leading to no data returned (eg. ctag in accounts-addressbook in eSync and CardDAV), DISTINCED added twice and not using so_sql_cf::search if no custom fields defined
2013-07-23 13:50:11 +00:00
Ralf Becker
0bca64517c
fixed SQL error introduced by r43149: multiple identical rows
2013-07-23 07:57:55 +00:00
Ralf Becker
93eac83b8a
fixed wrong bracket causing SQL error: is not unique
2013-07-04 16:42:33 +00:00
Ralf Becker
9a4693822c
* PostgreSQL: automatic fix GROUP BY clause to contain all non-aggregate selected columns, to work around SQL errors, caused by this MySQL "optimisation"
2013-06-28 10:44:46 +00:00
Ralf Becker
bd1d0f7c18
fixed not working quoting of multiple values specified as array, can not use array walk, as 2. parameter is the key not passed data
2013-05-31 08:29:34 +00:00
Ralf Becker
ac67c9ed80
log sql by setting $this->debug = true, before calling so_sql::search()
2012-11-14 14:23:00 +00:00
Ralf Becker
130dded1e2
added automatic conversation of boolean columns on select (update/insert is already done by quote), get automatic enabled by setup_table or you have to set has_bools to true
2012-07-21 09:51:22 +00:00
Nathan Gray
fe7814b64c
Prepend table name to avoid ambiguity
2012-05-14 18:03:42 +00:00
Frédéric Erpicum
afa20726f8
* ProjectManager - Filter elements by app
2012-02-27 20:20:42 +00:00
Ralf Becker
b34d6f9d35
automatic conversation of not set DB timestamps returned by MySQL as "0000-00-00 00:00:00" to null
2012-01-11 01:03:45 +00:00
Ralf Becker
d2adcf972d
skip the empty (NULL) row
2011-09-09 19:55:22 +00:00
Ralf Becker
476deb3605
query_list(). initialize return value to array(), to allways return an array
2011-09-09 09:41:51 +00:00
Ralf Becker
f9444ae1cd
added "decimal" to nummeric types, to fix PostgreSQL error (bug #2105 )
2011-04-10 15:12:43 +00:00
Ralf Becker
778d03772a
fixed typo CAPABILITY_CAST_AS_VA(R)CHAR
2011-03-20 12:49:22 +00:00
Ralf Becker
c492c57e2f
* Addressbook: fixed PostgeSQL error when searching or showing accounts
2011-03-20 12:37:22 +00:00
Nathan Gray
e2d54119dd
- Fix infinite loop bug if you use 'OR' in search
...
- Use case-insensitive LIKE from db capabilities
2011-01-07 21:13:40 +00:00
Nathan Gray
48ba641cb3
Avoid conflicts with other objects that have ->db defined by using the global db
2010-07-13 14:22:14 +00:00
Ralf Becker
30ce2262dd
if search pattern alread contains a wildcard, do NOT add further ones automatic (eg. in extended search in addressbook)
2010-06-25 07:11:39 +00:00
Jörg Lehrke
a4b36620dd
Fix excess of maximum column length issue
2010-06-18 09:33:57 +00:00
Ralf Becker
579cf86bbc
fix for bug #2624 : SQL error - CONCAT not supported by postgres
2010-05-26 15:44:09 +00:00
Nathan Gray
2760915be4
Always understand english search operators
2010-05-25 19:04:40 +00:00
Jörg Lehrke
334a8c6fc3
Fix addressbook_bo::find_contact()
2010-04-21 17:41:34 +00:00
Klaus Leithoff
69da1000b2
if only keys is passed to search return only the DISTINCT result-set (was not implemented when only_keys where passed as array)
2010-04-21 12:14:04 +00:00
Klaus Leithoff
7a4f191fb3
fix to provide (return) data even if a shortname is used as column name
2010-04-20 13:58:01 +00:00
Ralf Becker
423dbbc567
"an other fix: if there's already an explicit named column, just use that name"
2010-04-20 08:12:22 +00:00
Ralf Becker
f2e9a38ff4
"fixed ambiguous column sql-error by adding table-name to id over which we join"
2010-04-04 09:08:25 +00:00
Ralf Becker
a45ea03b19
"fixed ambiguous column sql-error by adding table-name to id over which we join"
2010-04-04 08:59:37 +00:00
Nathan Gray
5e23cfb764
Working on searching...
...
- Check default column names to avoid DB errors
- Prefix default column names with table name to avoid ambiguity
- Handle single words in quotes
2010-04-01 20:48:16 +00:00
Nathan Gray
4b134dfc9e
Extra column check needs to be escaped
2010-04-01 20:19:28 +00:00
Nathan Gray
fa6c1d4a9c
Need to set numeric types to check
2010-04-01 20:07:01 +00:00
Nathan Gray
d22773d04d
Add extra search functionality to custom fields.
2010-04-01 19:59:50 +00:00
Nathan Gray
3d8fca332b
More sensible handling of numeric columns:
...
- If app doesn't specify columns to search, all columns except numerics with '_id', 'modified', 'modifier', 'status', 'cat_id', 'owner' will be considered
- Numeric columns will be searched only if the search string contains a numeric token. 'maintenance 50' is ok to search for, but for numeric columns only 50 will be searched.
- Numeric columns are searched using equality, unless user puts in a wildcard. Searching for 50 will only match 50, not 150 or 1950/04/10, but *50 will match 150.
- Text columns are searched using LIKE, including numeric search terms, as before.
2010-04-01 17:03:51 +00:00
Nathan Gray
cc0f8f3c28
An attempt to add more functionality to searching
...
- All words are trimmed
- Double quotes require the exact phrase ("Nathan Gray" will not match Nathan Brown or Gray Power)
- Modifiers + and - before a word will require or exclude the word (+test -fail), otherwise word is ORed
- User language modifiers AND, OR and NOT (uppercase) will be parsed.
- Combinations: tracker entry -testing -"fatal error"
Note that "entry" will not match "entries", and the results are not sorted by match strength.
All applications that use so_sql for searching should gain these benefits.
2010-03-31 21:29:11 +00:00
Ralf Becker
ab598b8fcb
fix for user changing the timezone while having an edit popup open (unfixed the timestamps would change by the differenz of the two timezones). This fix does eg. NOT fix history logging (depending on the entry read before saving it), so it is better to handle the situation in the UI code, thought this is better then not handling it at all
2010-02-17 00:55:43 +00:00
Ralf Becker
0e646e28c8
optinally return an iterator for a search
2009-11-24 10:59:19 +00:00
Ralf Becker
200a6d61d5
Reworked so_sql class to:
...
- use new egw_time::server2user() and egw_time::user2server() to do
timezone conversation of registered timestamps
- added $timestamp_type parameter to constructor, to automatic convert
all timestamps on read (or search) to given type, default NULL leaves
them unchanged --> will allow in future to work completly with
egw_time objects
2009-10-08 16:18:28 +00:00
Ralf Becker
ad5d2c3941
docu update and fixed so_sql_cf::delete($keys,true) to always return array
2009-09-16 10:20:34 +00:00