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

Submitted by:  Caeies <Caeies>
Submitted on:  Mon 03 Nov 2003 01:02:20 PM UTC  
 
Item Group:  0.9.16RC1 Category:  eTemplates
Severity:  3 - Normal Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  Caeies <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>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

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.3