[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [bug #6242] Failed to update entry when more than
From: |
nobody |
Subject: |
[Phpgroupware-tracker] [bug #6242] Failed to update entry when more than one key columns |
Date: |
Mon, 03 Nov 2003 02:05:27 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031020 Debian/1.5-1 |
=================== BUG #6242: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6242&group_id=509
Changes by: Dave Hall <address@hidden>
Date: Mon 11/03/03 at 18:05 (Australia/Melbourne)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
This has been corrected in CVS.
To grab a complete update of all fixes:
1) Check to see if you have cvs installed: 'cvs --help'.
1a) If not, install a copy of cvs-cli from your favorite
distro.
2) Then just type:
'cd <your phpgroupware dir>; cvs update -dP'.
You can do step 2 as many times in a day as you wish, and
will always get the most current bug fixes.
Thanks,
=================== BUG #6242: FULL BUG SNAPSHOT ===================
Submitted by: Caeies Project: phpGroupWare
Submitted on: Thu 10/30/03 at 23:24
Category: eTemplates Bug Group: 0.9.16RC1
Severity: 5 - Major Priority: Normal
Resolution: Fixed Assigned to: skwashd
Status: Closed 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: Mon 11/03/03 at 18:05 By: skwashd
This has been corrected in CVS.
To grab a complete update of all fixes:
1) Check to see if you have cvs installed: 'cvs --help'.
1a) If not, install a copy of cvs-cli from your favorite
distro.
2) Then just type:
'cd <your phpgroupware dir>; cvs update -dP'.
You can do step 2 as many times in a day as you wish, and
will always get the most current bug fixes.
Thanks,
-------------------------------------------------------
Date: Fri 10/31/03 at 02: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: Fri 10/31/03 at 02: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/03 at 23: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] |
- [Phpgroupware-tracker] [bug #6242] Failed to update entry when more than one key columns,
nobody <=