bugphpGroupWare - Bugs: bug #6318, Problem updating a table with no...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #6318: Problem updating a table with no data cols in class.so_sql.inc.php

Submitter:  Caeies <Caeies>
Submitted:  Mon 03 Nov 2003 01:02:20 PM UTC
   
 
Category:  eTemplates Item Group:  0.9.16RC1
Severity:  3 - Normal Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  Caeies Open/Closed:  Open
Component Version:  SVN Operating System:  GNU/Linux - Debian
Reproducibility:  Every Time Planned Release:  None
Fixed Release: 

Mon 03 Nov 2003 01:02:20 PM UTC, original submission:  

Description :
When trying to update a record in a table that have no data cols (only key cols), the update failed.

Solution :
in the file etemplates/inc/class.so_sql.inc.php at line 332
just add a test against the $vals value:

if (!empty($vals))
{
   $this->db->query($sql = "UPDATE $this->table_name SET $vals WHERE $keys",__LINE__,__FILE__);
}
else
{
 /* No need to update :)*/
}

Seems working here, but I'm not sure that's there is no correlated bug.
Need to be tested against already made etemplate apps.

Caeies <Caeies>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2004-06-06 skwashd Assigned toNone Caeies

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code