Tagged Questions
0
votes
0answers
8 views
Merge similar records in MySQL (python & sqlalchemy)
I've an huge database table, composed by Music genres.
There're almost 35000 records, most of them are mainly expressing the same genre, for example:
+-----------+
| Name |
+-----------+
| ...
0
votes
0answers
22 views
Simplifying Large SQL Prepared Statements in Python
I've made a Python script to insert some values from Excel Spreadsheets onto a mySQL database. I'm using mySQLdb and prepared statements. I am reading from multiple files with iterators, and each of ...
0
votes
0answers
22 views
Running two python scripts through cron which alters two different tables in same mysql database
I am relatively new to programming and thus have limited experience when it comes to the logic involved in getting scripts to work as I want.
In a nutshell I have an Arduino connected to a raspberry ...
-7
votes
1answer
66 views
MySQL Interface. What to pick php, python, perl,…? [closed]
I'm currently building a mySQL database. And I would like to have a easy interface of the user. And I don't know what to use for this interface...
To input the data I would like to have some kind of ...
1
vote
1answer
17 views
Filter mySQL data while using fetchall(), before passing rows into Excel, via DataNitro
I am trying to simplify this so it will pull any data and lay out without any conflict, but I find errors if I have a date structure with colons and if some of my products have uses of backslash or ...
1
vote
1answer
32 views
formatted output like this in python
Here is the python code with the query to the database
cursor.execute("""select count(distinct offering_name) as events
,count(learner) as learners
,count(distinct learner) as unique_learner
...
0
votes
1answer
56 views
How to format the output as a table
Here is the python code with the query to the database
cursor.execute("""select count(distinct offering_name) as events
,count(learner) as learners
,count(distinct learner) as unique_learner
...
0
votes
1answer
25 views
Getting brackets while executing query into mysql database using python
I need help!! I have written a python code which queries the database and prints the result in the Linux shell prompt here is the code :
#!/usr/bin/python
import MySQLdb
import sys
import config
...
1
vote
0answers
33 views
MySQL Connector/Python stored procedure insert not committing
I'm writing a python script to monitor a few 1wire sensors off of a Raspberry Pi and store the results in a MySQL database.
Using the MySQL Connector/Python library I can successfully connect to the ...
0
votes
1answer
23 views
MySQLdb return `Decimal` for a `sum` of `INT`
This is the table definition I use to reproduce the issue:
create table test_sum_type
(
kind char(1) not null,
n tinyint not null
);
Test data:
+------+---+ ...
0
votes
2answers
40 views
Where to begin with saving user input in Python
I am building a basic app in python in which the user inputs data being used for the task. I found how to write to a table using mysql, but I'm not sure if that's what I want. I'd like them to be ...
0
votes
0answers
20 views
Databug I need to program arround
I have solar panels from which I log the data into a mysql db, due to a bug in the inverter the first few entries are from the day before and at some point the inverter reset and the actual values are ...
0
votes
1answer
10 views
Configuring MySQL with python on OS X lion
MySQL is installed at /usr/local/mysql
In site.cfg the path for mysql_config is /usr/local/mysql/bin/mysql_config
but when i try to build in the terminal im getting this error:
...
0
votes
0answers
38 views
Error while using the id of one record in another record
models.py
from django.db import models
import datetime
class Categories(models.Model):
category_name=models.CharField(max_length=200)
def __unicode__(self):
return ...
0
votes
1answer
25 views
Python MySQLdb String Replacement
I am trying to figure out why my mysql insert statement doesn't seem to work with string replacement. Simple example.
#!/usr/bin/python
import MySQLdb
db = MySQLdb.connect(host="localhost", ...