Python Tuples and Mysql Query

Reply

Join Date: Nov 2006
Posts: 7
Reputation: sliver_752 is an unknown quantity at this point 
Solved Threads: 0
sliver_752's Avatar
sliver_752 sliver_752 is offline Offline
Newbie Poster

Python Tuples and Mysql Query

 
0
  #1
Apr 7th, 2007
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Python Tuples and Mysql Query

 
0
  #2
Apr 15th, 2007
SQL lingo is about as simple as it gets. Don't expect any fancy functions from it.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC