Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to plot additional PIDs #24

Open
artesea opened this issue Oct 29, 2014 · 3 comments
Open

Unable to plot additional PIDs #24

artesea opened this issue Oct 29, 2014 · 3 comments

Comments

@artesea
Copy link

artesea commented Oct 29, 2014

I've enabled PID kff1201 - Miles Per Gallon(Instant). It's being stored in the raw_logs, however it's not available to plot.
Looking at the source code the issue appears to be that the column is created as a VARCHAR(255), whilst get_columns.php is only looking for FLOATS.
Changing the column type to a FLOAT through MySQL fixes this issue, however as there is no Column Comment the description isn't pulled through.
Either the column comment should be added at the same time as the column, or the description should be pulled from the csv each time.

@rcompton
Copy link

I've noticed the same thing. Manually entering kff1201 into the url bar works but I don't see MPG in the dropdown menu.

@Coppan
Copy link

Coppan commented Feb 12, 2015

I changed the type from char to float with phpmyadmin and set "comment" manually. It seems that all new columns are created as chars and dont get listed in the pulldown menu.

@smackYYZ
Copy link

TO fix this I altered upload_data.php

I replaced:

$sqlalter = "ALTER TABLE $db_table ADD $key VARCHAR(255) NOT NULL default '0'";

With:

if (preg_match("/^k/", $key)) {
$sqlalter = "ALTER TABLE $db_table ADD $key float NOT NULL default '0' comment '$key'";
} else {
$sqlalter = "ALTER TABLE $db_table ADD $key VARCHAR(255) NOT NULL default '0'";
}

Then when I see a new value in the selector, I just alter and run this query :

alter table raw_logs modify COLUMN columnName comment 'RealName';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants