SphereServer BugTracker - SphereServer
View Issue Details
0001727SphereServerexecutable - linux buildpublic03-03-10 12:0012-06-14 12:46
HOCOK 
Ben 
normalminorhave not tried
closedwon't fix 
0.56c Nightly 
 
Not Available
None
None
0001727: db. object mysql overwriten
db.query "SELECT * FROM `table1`;"
for i 0 (<db.row.numrows> - 1)
   db.query "SELECT * FROM `table2`;"
   local.z = <db.row.0.any>
endfor

Can you fix, when you use db in for , then db object is overwrited by next db query ?

need some local db query.. so it will not be overwriten..

This is really annoying bug
No tags attached.
Issue History
03-03-10 12:00HOCOKNew Issue
03-03-10 12:00HOCOKNightly Version => Not Available
03-03-10 12:00HOCOKExperimental Flags => None
03-03-10 12:00HOCOKOption Flags => None
27-03-10 13:50dzhonyNote Added: 0000427
27-03-10 14:00HOCOKNote Added: 0000428
14-11-10 19:54MrSugarCubeCategoryexecutable - linux => executable - linux build
12-06-14 03:39BenNote Added: 0002288
12-06-14 03:40BenStatusnew => closed
12-06-14 03:40BenAssigned To => Ben
12-06-14 03:40BenResolutionopen => won't fix
12-06-14 12:15HOCOKNote Added: 0002291
12-06-14 12:15HOCOKStatusclosed => feedback
12-06-14 12:15HOCOKResolutionwon't fix => reopened
12-06-14 12:46BenStatusfeedback => closed
12-06-14 12:46BenResolutionreopened => won't fix

Notes
(0000427)
dzhony   
27-03-10 13:50   
use JOIN statement in SQL query, the for cycle may be significantly slower
(0000428)
HOCOK   
27-03-10 14:00   
yes but this is not a fix.. some times you need to use function in function and in function / dialog etc. Every of them use own sql query, and they all will overwrite db. object.. that is not nice.
(0002288)
Ben   
12-06-14 03:39   
DB is a global variable so this is not possible.
Changing DB to be a localized var would create other issues in the server and is not worth changing for.
(0002291)
HOCOK   
12-06-14 12:15   
Thanks for the "fast" answer. We have learned to deal with this bug.