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
Ralf Becker
19086bb7b0
Some fixes and enhancments to simplify search with so_sql
...
- search($criteria,...) if $criteria is a string, search in all data
columns or - if set - $this->columns_to_search
--> that's NOT backward compatible - though a quick scan through the
EGroupware code showed no use of $criteria as string!
- this automatic search, appends and prepends '%' only, if search
pattern does NOT already contain wildcards (* or ?)
--> allows to search "test*" for values starting with test
- improved handling of db timestamps (Y-m-d H:i:s), to allow to search
for them too (eg. "2009-08-*")
- so_sql_cf::get_rows() now calls parent
- so_sql_cf::search() adds DISTINCT if query contains a join
--> ToDo: remove custom search code from apps, to give consitent search
behavior in all apps and simplify the code there
2009-08-19 12:08:52 +00:00
Ralf Becker
35626a6593
"docu update to avoid a common pitfall"
2009-08-17 12:28:30 +00:00
Ralf Becker
2a4e1a95cb
"- method to automatic convert all timestamp fileds to and from usertime
...
- enable this->timestamps to deal with timestamp type columns (as well as integers as before)"
2009-08-10 13:48:11 +00:00
Ralf Becker
232252475f
patch fixing many depricated functions (eg. posix regular expressions) and features, which fill up the error_log under php5.3 (and will no longer be available under php6).
...
Patch is mostly created by script in egroupware/doc/fix_depricated.php in separate commit.
I do NOT advice to apply this patch to a production system (it's commited to trunk!), as the automatic modified regular expressions have a good change to break something ...
2009-06-08 16:21:14 +00:00
Ralf Becker
95168d28bb
"method to access comments in schema definition"
2009-05-13 09:58:21 +00:00
Ralf Becker
5a22640c82
- changed return value of search() to NULL instead false, if nothing
...
found, as this can be simply casted with (array) to work in foreach
- documentation update
2009-05-03 18:36:38 +00:00
Ralf Becker
f61ffc2e5e
allow to pass $extra_cols parameter from get_rows to search
2009-03-11 12:14:15 +00:00
Ralf Becker
1b4d236d4a
New class extending so_sql handing all custom fields needs: reading,
...
saving, searching, ordering and filtering
Makeing a full custom field implementation like in addressbook very easy
and quick
2009-01-17 03:36:58 +00:00
Stefan Becker
858485ad30
"fixed Bug #1663 'More News' not visible in sitemgr when limit is 1, -> so_sql, is now giving back the numbers of total"
2008-10-07 08:17:09 +00:00
Ralf Becker
a1a3ed0d35
"use egw_db::select instead of self::search in so_sql::not_unique() as it does NOT set this->data"
2008-09-22 16:00:45 +00:00
Ralf Becker
70052c8355
fixed SyncML and accounts problem reported by Phillip Herbert <pherbert-at-knauber.de>: update set all but the updated fields to NULL, instead of just updating the given fields
2008-07-02 15:25:54 +00:00
Ralf Becker
b3b53c2f87
"treat (space separated) words in search as or'ed search for them individually"
2008-06-26 16:08:47 +00:00
Ralf Becker
23c473690e
"removed accidently commited 2. patch"
2008-06-19 16:07:57 +00:00
Ralf Becker
b89e7b46a1
"fixed not working install (segfault) caused by account creation in sitemgr's default_records and the new uid code in addressbook_sql::save() going into an invinit recureing, because so_sql::update calls $this->save() instead of self::save()"
2008-06-18 19:56:26 +00:00
Klaus Leithoff
09abb185f9
# improving of the negated search criteria behavior
2008-06-17 07:28:35 +00:00
Ralf Becker
6b74d6ad88
"switched permanent debug message off again"
2008-06-04 05:26:52 +00:00
Ralf Becker
c34dc55633
"fixing the fix: only add primary key, if it's NOT an auto id"
2008-05-30 08:20:06 +00:00
Ralf Becker
b6be2fb249
"bugfix: not_unique() method was not working with unique indexes over multiple columns and was not testing the primary keys, with is also unique"
2008-05-28 12:17:06 +00:00
Ralf Becker
78dd1cdf03
missed new $no_clone parameter
2008-05-26 08:32:27 +00:00
Ralf Becker
83a250e085
php5 __construct plus old old class-name method calling the new constructor, added non_db_cols to __get() and __set()
2008-05-26 08:27:24 +00:00
Ralf Becker
b69b8085e6
Fixed some problems with the etag handling, causing an SQL error on
...
merging contacts, as reported by Johannes Gorschlüter from Stylite
2008-05-17 06:44:17 +00:00
Ralf Becker
d58ddd9999
"allow to insert rows with the auto-id specified"
2008-04-27 20:05:04 +00:00
Ralf Becker
163b795d45
"extra where condition, eg. to check etag on writing"
2008-04-26 07:49:01 +00:00
Ralf Becker
5fd2d8def8
removed unnecessary instancations and using static methods of html and egw_link class
2008-03-25 16:42:23 +00:00
Ralf Becker
ef43425f7f
allow to use global db-object (and no clone&set_app), if told so via a separate parameter to the constructor (not by default as the app using so_sql might not be ready for it)
2008-03-13 11:08:54 +00:00
Ralf Becker
33b2504316
"Added code to convert timestamps to so_sql.
...
If you want to use it, you only need to set the timestamps to be converted from user to servertime in so_sql::timestamps AND dont reimplemnt db2data/data2db (or call the default implementation)"
2007-12-04 01:13:53 +00:00
Ralf Becker
fb9d6db5be
"fixed so_sql::get_rows to return an empty array() instead of array(false) if nothing found"
2007-11-27 21:24:50 +00:00
Ralf Becker
336784d74e
fixed only partcial csv export in timesheet, get_rows was not using the num_rows parameter
2007-10-07 13:29:24 +00:00
Ralf Becker
f21e357253
fixed not working direct sql-updates (eg. 'etag=etag+1') via so_sql::save's parameter
2007-09-06 11:56:37 +00:00
Ralf Becker
c5ac764580
"- bugfix: data_merge was not merging null values (isset instead of array_key_exists)
...
- new update function, which write just the given cols and not the whole row"
2007-07-05 04:46:49 +00:00
Ralf Becker
94dced8024
"fix for bug #747 : Postgres SQL error searching tracker items"
2007-05-21 04:49:57 +00:00
Ralf Becker
e11b8e5e32
worked around stupid php5.2 empty haystack warnings
2007-04-29 14:25:19 +00:00
Ralf Becker
4e49113cc1
"removed debug-message"
2007-02-14 07:22:15 +00:00
Ralf Becker
6ffdbb01a1
"read: prefix column with table-name, if used in join, to prevent ambigous col-name"
2007-02-14 07:07:58 +00:00
Ralf Becker
e64e3e06b1
so_sql::init() returns now $this->data as eg. so_sql::read()
2007-01-08 15:57:58 +00:00
Ralf Becker
f4238614f3
new egw_db::capabilities['case_insensitive_like']=='LIKE' ('ILIKE' for Postgres) used for all so_sql search and the lettersearch in addressbook
2006-12-17 08:44:05 +00:00
Ralf Becker
297690b22c
added php4.3 compatibility function stripos, to get back php4.3 compatibility after the recent replacement of stristr with stripos
2006-12-09 14:20:10 +00:00
Ralf Becker
9e5ba08ecb
fixed warning introduced by strstr --> strpos conversation
2006-12-07 19:05:40 +00:00
Cornelius Weiß
4338f6726b
strstr -> strpos fix by thomas koch
2006-12-07 12:46:46 +00:00
Ralf Becker
998d51bef4
- fixed bug reported by Deti Fliegl: [ 1548175 ] Pictures in Addressbook cannot be deleted
...
- docu update
2006-08-29 04:19:38 +00:00
Ralf Becker
325d849332
allow to use columns, which are not unique, for read
2006-07-08 00:38:06 +00:00
Ralf Becker
07df005b44
so_sql::search() was loosing filters, sql-strings (int keys) where writen with that key, instead with []
2006-06-17 18:30:38 +00:00
Ralf Becker
abf67e8471
fix for no colums given via $only_keys=''
2006-05-17 03:02:47 +00:00
Ralf Becker
c019eda361
fix for integer values
2006-04-30 16:42:33 +00:00
Ralf Becker
c170b9a047
so_sql::search:
...
- you can use now "!''" (exclemation mark plus 2 single quotes) as value in $filter and $criteria to search for not empty columns
- only_keys (columns to retrieve) can additionally be an array of column-names
2006-04-24 20:48:18 +00:00
Ralf Becker
6a089fb606
some fixes
2006-04-23 14:42:41 +00:00
Cornelius Weiß
69aa6abdec
update docu to better run trough phpdocumentor
2006-04-20 17:12:30 +00:00
Ralf Becker
2261ca5419
- dont write columns not set in $this->data
...
- read used internal name of primary key, instead of db name (only matters if they differ)
- param column_prefix of constructor and setup_table, to automatic setup a conversation from internal name (without prefix) to the db-name with the prefix
--> I will commit this bugfixes after a short testing period to 1.2 too
2006-04-19 08:03:28 +00:00
Ralf Becker
85a9bfb5d3
For a union-query call search for each query with $start=='UNION' and one more with only $order_by and $start set to run the union-query
2006-04-05 15:22:50 +00:00