Working through sql insert quirks, adding barchart to front end