phpgroupware-tracker
[Top][All Lists]
Advanced

[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: Thu, 30 Oct 2003 10:06:00 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1

=================== BUG #6242: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6242&group_id=509

Changes by: Caeies <address@hidden>
Date: Thu 10/30/03 at 15:05 (GMT)

------------------ Additional Follow-up Comments ----------------------------
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).





=================== BUG #6242: FULL BUG SNAPSHOT ===================


Submitted by: Caeies                  Project: phpGroupWare                 
Submitted on: Thu 10/30/03 at 12:24
Category:  eTemplates                 Bug Group:  0.9.16RC1                 
Severity:  5 - Major                  Priority:  Normal                     
Resolution:  None                     Assigned to:  None                    
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/03 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/03 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]