|
[bug #6242] Failed to update entry when more than one key columns: msg#00620web.phpgroupware.tracker
=================== BUG #6242: LATEST MODIFICATIONS ================== http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6242&group_id=509 Changes by: Hsing-Foo Wang <phpgw@xxxxxxxxxxxxxxxx> Date: Thu 10/30/2003 at 15:25 (GMT) What | Removed | Added --------------------------------------------------------------------------- Assigned to | None | skwashd ------------------ Additional Follow-up Comments ---------------------------- skwashd: are you willing to take a look at this and verify? it seems it's a very small change... TIA (or 'merci' from Caeies :) ) =================== BUG #6242: FULL BUG SNAPSHOT =================== Submitted by: Caeies Project: phpGroupWare Submitted on: Thu 10/30/2003 at 12:24 Category: eTemplates Bug Group: 0.9.16RC1 Severity: 5 - Major Priority: Normal Resolution: None Assigned to: skwashd Status: Open Component Version: CVS Platform Version: Linux - Debian Reproducibility: Every Time Summary: Failed to update entry when more than one key columns Original Submission: in the file etemplate/inc/class.so_sql.inc.php, look at line 329 there is a $key.=($keys ? ',':'')."$db_col='".addslashes($this->data[$col])."'"; and after (line 331), $this->db->query($sql = "UPDATE $this->table_name SET $vals WHERE $keys",__LINE__,__FILE__); This is perhaps a c&p mistake, but we must change tthe line 329 to : $keys .= ($keys ? 'AND':'') . "$db_col='".addslashes($this->data[$col])."'"; If not, you won't be able to update an entry with more than one key column. This is the message from MYSQL : Database error: Invalid SQL: UPDATE picoget_carto_s SET nom='Internet et Web' WHERE sousapp='2',application='1',discipline='1' MySQL Error: 1064 (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'application='1',discipline='1'' at line 1) File: etemplate/inc/class.so_sql.inc.php Line: 331 Follow-up Comments ******************* ------------------------------------------------------- Date: Thu 10/30/2003 at 15:25 By: pooh_ skwashd: are you willing to take a look at this and verify? it seems it's a very small change... TIA (or 'merci' from Caeies :) ) ------------------------------------------------------- Date: Thu 10/30/2003 at 15:05 By: Caeies Yes what is here solve the problem, just change the: 'AND' with ' AND ' :) But Since I can test it only in my case, don't know if this create a new bug (but reading the code let me think that there is no problem). ------------------------------------------------------- Date: Thu 10/30/2003 at 12:38 By: pooh_ Did the suggestion below solve the problem? CC list is empty No files currently attached For detailed info, follow this link: http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6242&group_id=509 _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [bug #6245] DN are passed as uuencoded strings.: 00620, nobody |
|---|---|
| Next by Date: | [bug #3734] login into phpgw from sitemgr with long username does not work: 00620, nobody |
| Previous by Thread: | [bug #6242] Failed to update entry when more than one key columnsi: 00620, nobody |
| Next by Thread: | [bug #6245] DN are passed as uuencoded strings.: 00620, nobody |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |