Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
2k views

_mysql_exceptions.OperationalError: (1054, "Unknown column 'BOB-PC' in 'field list'")

I can't seem to find out what I'm doing wrong. It would be great to receive some feedback! import cgi, cgitb, MySQLdb cgitb.enable() db = MySQLdb.connect(db="watchdog",user="root",passwd="...
monk8855's user avatar
0 votes
2 answers
39 views

Bring in a variable into a SQL statement with CGI Python

All I want to do is do an update statement and bring in two cgi python variables: inputMin, and inputMax. Here's what I have: curInsert.execute("Update User set SetMinF = %d, SetMaxF = %d" .format(...
alexs973's user avatar
  • 301
1 vote
2 answers
341 views

Getting "Can't connect to MySQL server on '203.171.xx.xx' (13) " when trying to connect to remote sqlserver with python in cgi

When tried to connect to mysql database through python MySQLdb getting following err: File "/var/www/cgi-bin/add_user.py", line 39, in <module> addEntry(prop.text.strip()) File "/var/...
rik's user avatar
  • 113
1 vote
1 answer
13k views

how do i write multiple conditions in single sql query to get data - Python mysql

I am in a dilema that how could i writ such sql queries to make a seach. I have tried and posted it, but it not as expected when user enter data in multiple field of a form and make a search. The ...
Jeremy's user avatar
  • 73
1 vote
2 answers
1k views

How do i debug my cgi script with mysql database in python. I am new to how to debugg

My code is showing some error when runing on server. i checked the server error log and still not knowing what the exact it mean to say. It says premature end of script. Now I want to debug my code ...
Jeremy's user avatar
  • 73
0 votes
2 answers
9k views

How to insert Records of data into MySQL database with python?

I have an form which has FirstName, Lastname, Age and Gender. I am using MySQL db. While using MySQl db, do we need to create table , do the insert operation in the single pythonic script ? For ...
Jeremy's user avatar
  • 73
0 votes
6 answers
361 views

Python Web Programming - Not Using Django

I want to learn Python for Web Programming. As of now I work on PHP and want to try Python and its object oriented features. I have basic knowledge of python and its syntax and data strucures. I want ...
user1629766's user avatar
1 vote
1 answer
778 views

MySQL-python not executing in CGI

I am working with MySQL-python package. I am able to execute MySQL dependent scripts from command line, however doing the same through browser (Apache CGI) yields the following error: A problem ...
WeaklyTyped's user avatar
  • 1,351
0 votes
1 answer
2k views

Python cgi script inserts only integers into mysql database

I started scripting in Python and I ran a into weird problem. I am trying to insert some values into mysql database. Database fields are varchar, utf-8 unicode Using Python 3.2 and wamp server 2.2(...
Prsli's user avatar
  • 1
0 votes
1 answer
519 views

Python - import MySQLdb in a CGI script not working in a browser

I'm having some trouble with MySQLdb when using it in a CGI script. I'm on OSx and running off a local host. Basically, when I run my code from the terminal it runs fine, but when I run it from a ...
Ger's user avatar
  • 754