mysql-python

Django on CentOS

I'm looking to use Django on a shared host that's running an unknown version of CentOS. My main problem is trying to interface with a database. The server has MySQL installed, but not MySQL-python. I initially thought of suggesting running "yum install MySQL-python", but apparently the version of MySQL-python that's in the default reposi...

Python MYSQL update statement

Hi I'm trying to get this Python MYSQL update statement correct(With Variables): cursor.execute ("UPDATE tblTableName SET Year=%s" % Year ", Month=%s" % Month ", Day=%s" % Day ", Hour=%s" % Hour ", Minute=%s" Minute "WHERE Server=%s " % ServerID) Any ideas where I'm going wrong? ...

Installing python-mysql with wamp's mysql

Hello, (I'm not sure if this should be asked here or SU.. but seeing this question on SO, I am asking it here...) I have wamp (mysql-5.1.33) server setup on my vista machine, and I am trying to install python-mysql 1.2.3c1 to use the mysql version provided by wamp. At first, when I ran python setup.py install, I got an error saying it...

MySQL-python 1.2.3 and OS X 10.5: 64- or 32-bit?

I've been happily using Django and MySQL in development on an existing machine running OS X 10.4 Tiger, and have set up a similar environment in 10.5 Leopard on a new 64-bit MacBook, with a working MySQL and Python 2.6.4. However, now I want them to communicate, easy_install MySQL-python gave ld warnings that the file is not of the requ...

mysql-python install problem using virtualenv, windows, pip

I'm trying to install mysql-python in a virtualenv using pip on windows. At first, I was getting the same error reported here, but the answer there worked for me too. Now I'm getting this following error: _mysql.c(34) : Fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory edit: If I symlink (Win7) to...

Error message in python-mysql cursor: 1054 unknown column "x" in 'field list'

Hi there everyone, This is my first post! I also just started programming, so please bear with me! I am trying to load a bunch of .csv files into a database, in order to later perform various reports on the data. I started off by creating a few tables in mysql with matching field names and data types to what will be loaded into the ta...

Create chart/statistics for selected mysql table through python

Hi all, I'd like to start by asking for your opinion on how I should tackle this task, instead of simply how to structure my code. Here is what I'm trying to do: I have a lot of data loaded into a mysql table for a large number of unique names + dates (i.e., where the date is a separate field). My goal is to be able to select a partic...

How to install python2.6-devel package under CentOs 5

I need to install mysql-python under python2.6. mysql-python package needs python2.6-devel package that depends on the libpython2.6.so.1.0(64bit) I found on the net some python2.6-devel packages, but can't find libpython2.6 Server architecture is x86_64. Maybe someone have this lib, or know where i can find it. Thanks for help) ...

Using MySQL in Pydev Eclipse

Hi, I am trying to access a MySQL database with python through Pydev Eclipse. I have installed the necessary files to access MysQL from python and I can access the database only when I write code in Python IDLE environment and run it from command prompt. However I am not able to run my applications from Pydev. when I use this "import M...

combining two select statements to return one result

I need to combine the results for two select queries from two view tables, from which I am performing calculations. Perhaps there is an easier way to perform a query using if...else - any pointers? Essentially I need to divide everything by 'ar.time_ratio' under the condition in sql query 1, and ignore that for query 2. SELECT g...

installing mysql-python on Centos

Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any help will be highly appreciated [root@uu include]# easy_install mysql-python Searching for mysql-python Reading http://cheeseshop.python.org/pypi/mysql-python/ Couldn't find index page for 'mysql-python' (maybe misspelled?) Scanning index o...

setuptools easyinstall mysql-python-1.2.3

Hi everybody I have read a bunch of threads on setuptools here. A lot of people seem not to like it very much. But I need to install MySQL-python-1.2.3. and when I do that I get this error: MySQL-python-1.2.3 X$ python setup.py cleanTraceback (most recent call last): File "setup.py", line 5, in <module> from setuptools ...

how to using MySQLdb SELECT with for or while loop

import _mysql as mysql db=mysql.connect('localhost','username','password','database') db.query("""select * from news""") result = db.store_result() print result.num_rows()#two records #how to loop? without cursor print result.fetch_row() ...

Using PIP in a virtual environment, how do I install MySQL-python

When I'm in my virtual environment, I attempt to run: pip install MySQL-python This didn't work, so I tried downloading the package and installing it by running: python setup.py install This returns the following error: % python setup.py install ...