•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 426,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,846 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 1565 | Replies: 1
![]() |
Hello all,
Is there any algorithm to convert a python tuple to MySql query.
Ex:
('*','name','sliver')
should convert to
select [Pri_Key] from [All Tables] where 'name' = 'sliver';
I have been able to do so ... but my algorithm looks very ugly and have to process everything bit by bit.
The query becomes even more complex when i have nested tuples.
Any Ideas?
Is there any algorithm to convert a python tuple to MySql query.
Ex:
('*','name','sliver')
should convert to
select [Pri_Key] from [All Tables] where 'name' = 'sliver';
I have been able to do so ... but my algorithm looks very ugly and have to process everything bit by bit.
The query becomes even more complex when i have nested tuples.
Any Ideas?
•
•
Join Date: Mar 2006
Location: Bangalore
Posts: 18
Reputation:
Rep Power: 3
Solved Threads: 0
hi,
as i got you , i think the better way you can use is :
and then you can create your own method to run sql
-VS
as i got you , i think the better way you can use is :
qry = "select %s from %s where %s" %(name,table,filter)
-VS
•
•
•
•
Hello all,
Is there any algorithm to convert a python tuple to MySql query.
Ex:
('*','name','sliver')
should convert to
select [Pri_Key] from [All Tables] where 'name' = 'sliver';
I have been able to do so ... but my algorithm looks very ugly and have to process everything bit by bit.
The query becomes even more complex when i have nested tuples.
Any Ideas?
Best wishes,
Vivek Sharma
Zope/Python Developer
Vivek Sharma
Zope/Python Developer
![]() |
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- sql query problem with MS Access and C# (C#)
- Urgent Help with SQL Query (MySQL)
- C# VS 2005 - SQL Query Parameters to an ODBC DataSource (C#)
- sql query updating problem (Visual Basic 4 / 5 / 6)
- Javascript array from sql query (JSP)
- Please help me out with MySQL query (MySQL)
- PHP/SQL query help (PHP)
- Retreiving variables from a sql query into a form (PHP)
Other Threads in the Python Forum
- Previous Thread: Stuck in GUI
- Next Thread: Find a word in a file


Linear Mode