Commit Graph

62 Commits

Author SHA1 Message Date
Ralf Becker
de903d8957 an other PostgreSQL compatibility problem: cast to varchar necessary 2010-10-28 08:47:52 +00:00
Ralf Becker
7f29cd8530 fix for postgreSQL bug reported by Anthony Messina (amessina-at-messinet.com): sync_contentid is varchar(60) and need explicit cast: added egw_db->to_int($expr) 2010-09-10 07:11:22 +00:00
Ralf Becker
83dae424e0 new method to abstract MySQL function unix_timestamp (convert db timestamp to integer) 2010-09-09 09:06:13 +00:00
Ralf Becker
95ac7e77be fix for PostgreSQL 8.3, using "::text ILIKE", hopefully that works in older versions too 2010-06-22 16:56:16 +00:00
Ralf Becker
96db81c50c dont use IN ( ), if there's only one value, it's slower for MySQL 2010-03-04 17:18:30 +00:00
Ralf Becker
5225fe81e1 automatic convert egw_time/DateTime objects when quoting values 2009-10-08 16:20:37 +00:00
Ralf Becker
cdb601da56 "Fix for bug #1885: egw_db->row doesn't work as expected
reverted r25031, as it returns the first record with numeric indexes (it's anyway a depricated function)"
2009-07-18 12:33:52 +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
75f4a3920e "Patch from Carsten Wolf:
Timesheet-Einträge mit Uhrzeit 0:00, die in der Winterzeit gemacht wurden, 
werden in einem Union-Query, der in der Sommerzeit stattfindet, dem falschen 
Tag zugeordnet. Vermutlich stimmt dies nur für den PostgreSQL query und ist 
Dir deshalb bisher nicht aufgefallen.

Der Patch:
Ändert den PostgreSQL-spezifischen Teil des queries so um, dass er 
Zeitzoneninformationen berücksichtigt."
2009-05-30 07:03:57 +00:00
Ralf Becker
53264e2c2b "new static method to get an attribute of a column, eg. the comment" 2009-05-30 06:58:48 +00:00
Ralf Becker
aca05a32e3 using new check_load_extension function 2009-04-20 12:43:44 +00:00
Ralf Becker
3b0f5e5ab2 PDO compatibilty function fetchSingle() was renamed in PDO to
fetchColumn($column_num=0): now both are available in ADOdb, thought
fetchSingle is depricated and should no longer be used!
2009-03-25 09:03:36 +00:00
Ralf Becker
92c5157b90 add grant host to db creation 2008-11-18 19:58:11 +00:00
Ralf Becker
9ba17c163c "documentations update on how to use exceptions instead of depricated hald_on_error attribute" 2008-10-25 05:36:25 +00:00
Ralf Becker
b63928d7f0 "fixed problem reported on some installs with api >= r25860:
PHP Fatal error:  egw_db::connect(): The script tried to execute a method or access a property of an incomplete object ...
Problem was that session restore is now used regardless if it's explicitly switched on, egw_db::connect() only registered the required class, if it was explicitly switched on. Therefore it worked everywhere, where session restore was configured before, but failed everyone not used it before ;-)"
2008-08-13 05:20:23 +00:00
Ralf Becker
e568a02b2e new constructor, which can be passed the connection-data as an array 2008-08-07 20:38:57 +00:00
Ralf Becker
21c9e960df not the problem is fixed AND setup is still working :-) 2008-06-27 09:44:48 +00:00
Ralf Becker
e89917f860 reverting my last commit, as it breaks app update/install in setup 2008-06-27 09:40:32 +00:00
Ralf Becker
f82bdd9492 "fix for error in setup-cli: egw_minimal::__get: There's NO ADOdb object!" 2008-06-26 20:27:18 +00:00
Ralf Becker
70e540d71b constants for the capabilities array, easier lookup in IDEs, table name aliaes to eg. move some tables to other databases 2008-06-07 08:24:18 +00:00
Ralf Becker
eb2303adc8 "prevent that anyone switches the global db object to an app != 'phpgwapi' (you have to clone it before doing that)" 2008-03-22 12:32:24 +00:00
Ralf Becker
3bf9ad5efa dynamically autoloading sub-object of egw-object, moved __wakeup methods to concerned classes and other "modernsations" ;-) 2008-03-21 20:11:59 +00:00
Ralf Becker
c01818daa1 egw_db::expression searches for a table_def in all (loaded) apps, not just the current) 2008-03-13 19:30:01 +00:00
Ralf Becker
3760ea8608 fixed not found tabledefinition if no app-name given and a search of the table was requested (type in var-name) 2008-03-10 21:32:13 +00:00
Ralf Becker
97f63b43ff some compatibility stuff for ADOdb<->PDO 2008-03-09 14:22:02 +00:00
Ralf Becker
407b4defad static strip_array_keys method to strip a colum-prefix from a result, docu update about depricated functions which use the internal result-set 2008-03-08 21:31:12 +00:00
Ralf Becker
4f941b5a61 (hopefully) final fix: default for select() is now again ASSOC, but next_record() adds numerical indexes again, if they are required. That is a slight penality for old code, but gives full speed / lowest memory for new code. 2008-03-06 14:20:47 +00:00
Ralf Becker
046713e00f temp. fixed problem introduced with last egw_db commit (db::f() not working with db::select()), thought I want to check how often that is used, as an only asociative fetchmod needs half the memory 2008-03-06 13:33:38 +00:00
Ralf Becker
9de6c2884f added fetchmode parameter to query() and set it to ADODB_FETCH_ASSOC for select(), also added comment about how to avoid cloning the global db object and looping over result sets via the returned result object 2008-03-06 11:42:21 +00:00
Ralf Becker
a6b8ef57d5 "fixed error-message on no connection to a postgres server, to NOT contain the password" 2007-12-07 00:16:25 +00:00
Ralf Becker
cae8bb40a8 added draft of an exception class for eGW, plus a global exception handler and replaced the fatal errors in the db-class plus the application rights check in the egw object with exceptions, modified the exceptions in admin_cmd* to use egw_excpetion*, instead just Exception 2007-12-06 08:00:41 +00:00
Ralf Becker
4fa672d346 "Switched query logging off, was accidently left on, thanks to a notice from Nigel" 2007-12-04 16:20:20 +00:00
Ralf Becker
598a63379c "added a query log, independent of the db used" 2007-10-19 05:46:39 +00:00
Ralf Becker
059ca86239 "implemented automatic truncate of varchars to their max size for postgres, to fix SQL errors which cause eg. SyncML to fail under Postgres" 2007-06-20 18:47:14 +00:00
Ralf Becker
47400643f7 fixed db-creation to allow db-names with dashes 2007-05-15 06:37:24 +00:00
Pim Snel
c1c6bddace - fix bug in egw_db so that it will always work with postgresql if using external db's
- enhance schema_proc so that it can work with schema's of externals db objects
2006-12-20 15:18:27 +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
05cd4a36d9 added quoting for float and decimal types, prevents SQL errors 2006-12-08 10:16:00 +00:00
Cornelius Weiß
4421d6cf09 strstr -> strpos fix by thomas koch 2006-12-07 12:46:08 +00:00
Cornelius Weiß
f4baebf3c1 killed a php5.2 warning 2006-12-01 13:34:17 +00:00
Ralf Becker
dca9b4194d bugfix for db::expression: As the function has a variable number of arguments, you CAN NOT add further parameters !!! 2006-04-30 18:23:17 +00:00
Ralf Becker
912f82fd85 - new capability for outer joins
- new/changed param to allow to use db::get_table_definitions() without setting/chaning the definitions loaded by the db-class
2006-04-23 14:50:48 +00:00
Ralf Becker
00060f9551 - added functions to abstract from_unixtime and date_format for DB-types other then mysql
- db::select adds ORDER BY to append param, only if its not already in the append param
2006-04-05 15:14:59 +00:00
Ralf Becker
c230fb81c4 new capability union 2006-03-29 06:58:56 +00:00
Ralf Becker
3a8c25df86 added function to abstract SQL union statement, needed to speed up the calendar search for MySQL 5 2006-03-03 12:01:10 +00:00
Carsten Wolff
99cb0bd567 fixed a handfull of bugs that broke setup/update from 1.0 to 1.2 2006-01-06 16:21:51 +00:00
Ralf Becker
d0b013767b fixing the fix: sql strings (integer
index) were not used in the where clause on update/insert, causing eg. double entries for file-attachments
2006-01-06 04:52:10 +00:00
Ralf Becker
14b93846c0 reverted fix from 2005/11/23 as it caused trouble in other areas (eg. vfs class) and fixed the problem (cant insert sql-strings/numerical id's) in the insert-function 2005-12-02 10:41:50 +00:00
Ralf Becker
341eb15afb fixed not working system-charset conversation (now removed) with backup and re-install of backup with a different charset. A setable client encoding is used if availible. 2005-12-01 23:18:07 +00:00
Ralf Becker
68d0668328 fix for bool columns:
- work around some "magic" in ADODB's datadict
- MySQL4.1 allows the standard true/false for inserts only and not as default value
2005-11-29 07:52:18 +00:00