phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bug #5245] Upgrade of existing DB fails


From: nobody
Subject: [Phpgroupware-tracker] [bug #5245] Upgrade of existing DB fails
Date: Thu, 18 Sep 2003 17:30:25 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718

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

Changes by: Stefan Lauterbach <address@hidden>
Date: Thu 09/18/2003 at 21:30 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Sorry, I didn't realize that there are two sections that have to be enclosed in 
()'s, one for work and one for home "organizations" (or whatever ;-)



The whole DB migration seems to work now.





=================== BUG #5245: FULL BUG SNAPSHOT ===================


Submitted by: stl                     Project: phpGroupWare                 
Submitted on: Fri 09/12/2003 at 20:47
Category:  API - phpGWapi             Bug Group:  0.9.16RC1                 
Severity:  5 - Major                  Priority:  High                       
Resolution:  None                     Assigned to:  alexbsa                 
Status:  Open                         Component Version:  CVS               
Platform Version:  Linux - SuSE       Reproducibility:  Every Time          

Summary:  Upgrade of existing DB fails

Original Submission:  Unfortunately I ran into another error. And I cannot find 
the location of the SQL statement.



Database error: Invalid SQL: 3

MySQL Error: 1064 (You have an error in your SQL syntax near '3' at line 1)



Session halted.

Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 09/18/2003 at 21:30       By: stl
Sorry, I didn't realize that there are two sections that have to be enclosed in 
()'s, one for work and one for home "organizations" (or whatever ;-)



The whole DB migration seems to work now.



-------------------------------------------------------
Date: Thu 09/18/2003 at 20:52       By: stl
Sorry, I didn't realize that there are two sections that have to be enclosed in 
()'s, one for work and one for home "organizations" (or whatever ;-)



The whole DB migration seems to work now.



-------------------------------------------------------
Date: Thu 09/18/2003 at 20:06       By: stl
I tried the last hint an got ;-)



Database error: Invalid SQL: 4

MySQL Error: 1064 (You have an error in your SQL syntax near '4' at line 1)



Session halted.



-------------------------------------------------------
Date: Thu 09/18/2003 at 13:51       By: eald
try to enclose this between () 
($GLOBALS['phpgw_setup']->oProc->f('addr_type_id'))? 
$GLOBALS['phpgw_setup']->oProc->f('addr_type_id') : $addr_type 



($GLOBALS['phpgw_setup']->oProc->f('addr_type_id'))? 
$GLOBALS['phpgw_setup']->oProc->f('addr_type_id') : $addr_type)



Btw $GLOBALS['phpgw_setup']->oProc->f('addr_type_id') have a description or an 
id?

because we need an id here.





-------------------------------------------------------
Date: Thu 09/18/2003 at 06:39       By: jarg
hey!! i think i found where is the error, in setup scripts, in 
tables_update.inc.php when try to upgrade the addresses this code run:



$db1->query("INSERT INTO phpgw_contact_addr(contact_id,add1,

city, state, postal_code, country, tz, addr_type_id,

created_on, created_by, modified_on, modified_by) VALUES ("

. $GLOBALS['phpgw_setup']->oProc->f('org_id') 

. ", '" .

$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('adr_one_street')) 

." '" . ", '" . 

$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('adr_one_locality'))

. "'" . ", '" . 
$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('adr_one_region')) 

." '" . ", '".

$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('adr_one_postalcode')) 

." '". ", '" . 
$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('adr_one_countryname')) 

." '". ", " .

intval($GLOBALS['phpgw_setup']->oProc->f('tz'))

. ", " . 

($GLOBALS['phpgw_setup']->oProc->f('addr_type_id'))? 
$GLOBALS['phpgw_setup']->oProc->f('addr_type_id') : $addr_type 

. ", " . $GLOBALS['phpgw_setup']->oProc->f('created_on')

. ", " . $GLOBALS['phpgw_setup']->oProc->f('created_by')

. ", " . $GLOBALS['phpgw_setup']->oProc->f('modified_on')

. ", " . $GLOBALS['phpgw_setup']->oProc->f('modified_by')

.  ");");





and for any reason the sql which this want to run is '3' i think this 3 is the 
addr_type_id, but i don't know why this concatenation only returns '3'.



i will review this later and try to fix, but probably bjohnson can help me in 
this :P





-------------------------------------------------------
Date: Sat 09/13/2003 at 23:15       By: skwashd
Can you please try a CVS update - I think this one was fixed the other day.


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5245&group_id=509

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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