On 6/2/06, Filipe <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I'm trying to use django for a web application which will be searching
> in an existing database. I won't really need models as the most part of
> business logic will be running on the database (in the form of pretty
> large sql queries).
>
> What is the best way to issue a sql query to the database bypassing
> Django's object-relational mapper?
>
> I've tried the following simple test:
>
> cursor = connection.cursor()
> cursor.execute("SELECT * FROM Table WHERE Field1 = %s", 1)
> row = cursor.fetchone()
>
> but django reported that it "Could not load database backend: No module
> named MySQLdb". The values in settings.py seem to be alright... Am I
> missing something?
>
Do you have the Python wrappers for MySQL installed
(http://sourceforge.net/projects/mysql-python)?
Jay P.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---