0
votes
2answers
26 views

warning :data truncated for column 'username' at row 1 when using database mysql with django

I am getting the above mentioned warning data truncated for column 'username' at row 1 I am getting this for my model "suserprofile" with "username" as my first listed field ...
2
votes
1answer
68 views

Is __enter__ and __exit__ behaviour for connection objects specified in the Python database API?

Background I recently discovered the Python with keyword and started seeing its potential usefulness for more prettily handling some scenarios where I'd previously have used try: ... finally: ... ...
0
votes
2answers
192 views

Inserting multiple dictionary objects into a MySQL database using python and MySQLdb

I have been struggling with this for hours and I feel like crying now as I'm unable to fathom out what is happening. Here is a simplified version of my data: mydata = [ { 'id': 123, 'thing': 'ghi', ...
0
votes
1answer
96 views

Read database entries from mysql in the form of dictionary in python [duplicate]

Possible Duplicate: Python: use mysqldb to import a MySQL table as a dictionary? I currently get the db entry in the form of array using the commands db_conn = mdb.connect(host = ...
2
votes
1answer
97 views

medium - large portable database options for python program

I am creating a simple python program that needs to search a somewhat large database ( ~40 tables, 6 Million or so rows all together ). Currently, I use MySQLdb to quarry my local MySQL database ...
0
votes
2answers
535 views

MySQLdb with multiple transaction per connection

Is it okay to use a single MySQLdb connection for multiple transactions without closing the connection between them? In other words, something like this: conn = MySQLdb.connect(host="1.2.3.4", ...
1
vote
1answer
36 views

Importing the database content along with the code..

I have written a code in Python which accesses Mysql database in my computer.My question is how do I make my program run on other machines i.e how do I transfer the database ?? Thank you for ...
0
votes
1answer
119 views

Regular expression in mysql database

I have stored certain regular expressions in mysql database.When I access the same with cursor.fetchone() and use the regular expression in re.match() function,the result is not as intended whereas if ...
0
votes
2answers
135 views

How do I check why my INSERT query is not working?

conn = MySQLdb.connect(host=IP,user='john',passwd='ab2nng',db='mydb') cursor = conn.cursor() #this works. cursor.execute("select * from crawl_log") res = cursor.fetchall() print res #this doesn't ...
0
votes
1answer
232 views

Python | MySQLdb -> I cant insert

I have an odd problem. There are two databases. One has all products in it for an online shop. The other one has the online-shop software on it and only the active products. I want to take the values ...
2
votes
1answer
153 views

MySQLdb and big queries using CursorUseResultMixIn

How can I use the CursorUseResultMixIn in MySQLdb. The obvious thing to do was: con=MySQLdb.connect(host='localhost', user='test', passwd='xx', db='yy') curs = ...
0
votes
1answer
206 views

Unable to connect to Database using MySQLdb in Robotframework

Using Robotframework 2.6.3 and the python database library, I want to connect to MySql Database. I have downloaded the DatabaseLibrary and MySQLdb however when I try to connect using: Library ...
1
vote
2answers
50 views

How to know if it is unsigned of a field from mysql by MySQLdb

I use MySQLdb(a python library) to talk with mysql. Is there some way to get the field type using MySQLdb , and the most important thing is how can I know it is unsigned or not ? I know we can use ...
1
vote
4answers
332 views

Python MYSQLdb documentation missing details?

I am trying to make sense of MySQLdb documentation. I was just wondering if there are things missing from there. For example, I am trying to see what "rowcount" (a constant) actually does, but am not ...
-3
votes
1answer
145 views

two database connection with Mysqldb in python

Can any body please let me know if more than one database connection at a time is possible with Mysqldb in python script. I have a scenario where i want to query from databaseA tables (which can be ...

1 2
15 30 50 per page