Comments (4)
Are you using version 2.0.2 from SVN trunk?
It seems that you are calling `db_select($column, $table, $condition)` instead
of `db_select($table, $column, $condition)` in functions.db.php.
Please verify, as this issue should not happen in the trunk version:
http://code.google.com/p/smt2/source/browse/trunk/admin/sys/functions.db.php
http://code.google.com/p/smt2/source/browse/trunk/admin/ext/tracking-report/anal
yze.php
Original comment by [email protected]
on 20 Mar 2012 at 6:10
from smt2.
I am using 2.0.2 from SVN trunk. It appears that the problem is caused in
analyze.php and sql.php, in the sections that the sql query is constructed.
Apparently, associating an alias with multiple columns is causing the error:
=== Original code ===
$log = db_select($r." LEFT JOIN ".$c." ON ".$r.".cache_id = ".$c.".id LEFT JOIN
".$b." ON ".$r.".browser_id = ".$b.".id LEFT JOIN ".$o." ON ".$r.".os_id =
".$o.".id", $r.".* AS record, ".$c.".* AS cache, ".$b.".name AS browser,
".$o.".name AS os", TBL_PREFIX.TBL_RECORDS.".id = '".$id."'");
=====================
This one works..
=== Modified code ===
$log = db_select($r." LEFT JOIN ".$c." ON ".$r.".cache_id = ".$c.".id LEFT JOIN ".$b." ON ".$r.".browser_id = ".$b.".id LEFT JOIN ".$o." ON ".$r.".os_id = ".$o.".id", $r.".*, ".$c.".*, ".$b.".name AS browser, ".$o.".name AS os", TBL_PREFIX.TBL_RECORDS.".id = '".$id."'");
=====================
Original comment by [email protected]
on 20 Mar 2012 at 7:22
from smt2.
The alias is used in each left join for convenience, to avoid collisions when
various columns in various tables have the same name (e.g. all joined tables
have an "id" column). However, in analyze.php $log['id'] is not needed, so
there is no risk of collision and in effect you can safely remove the aliases.
I don't remember if there are other scripts that access the id column from
other tables in the same SQL query, so right now I cannot remove those aliases
from the code. BTW, you are the first one in reporting that issue.
I'll leave this issue open until the next version 2.1.0 is released.
Original comment by [email protected]
on 21 Mar 2012 at 9:14
from smt2.
Eventually alias were removed, since they are no longer needed in other scripts.
Therefore I'm closing this issue, as it is solved in current version (2.1.0).
Original comment by [email protected]
on 31 Mar 2012 at 6:21
- Changed state: Verified
from smt2.
Related Issues (20)
- SWF playback shows no layers and control menu not available HOT 6
- Could not find new (smt)2 releases. If your Internet connection is OK, maybe the server is temporarily down. HOT 8
- Metrics not recorded exept time HOT 3
- Logs older than 1 hour are Orphans HOT 5
- Nothing to run HOT 1
- Not files in ZIP HOT 1
- Horizontal scroll bar HOT 2
- Empty Log View HOT 2
- Cross domain POST - smt2 installed on one domain, tracking data from another domain HOT 2
- [deleted issue]
- Cookies and only first visit HOT 1
- Bug when using remote "storageServer" HOT 1
- no tracking HOT 15
- Creating database smt: Error. HOT 3
- Mouse movements not animated
- Mouse tracker does not record HOT 1
- Several User IDs for the same User HOT 3
- Import Logs and session lifetime HOT 7
- Click movements not recorded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smt2.