Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Why Doesn't This MySQL Statement Execute?

Reply
Thread Tools

Re: Why Doesn't This MySQL Statement Execute?

 
 
Wayne Werner
Guest
Posts: n/a
 
      12-18-2012
On Tue, 18 Dec 2012, Tom Borkin wrote:

> Hi;
> I have this test code:
> *
> *** if i_id == "1186":
> ***** sql = 'insert into interactions values(Null, %s, "Call Back", "%s")' % (i_id, date_plus_2)
> ***** cursor.execute(sql)
> ***** db.commit()
> ***** print sql
> It prints the sql statement, but it doesn't execute. If I copy and paste the sql into the mysql command line it does execute without warnings or errors. What gives?


Does date_plus_2 contain

"Robert"); DROP TABLE interactions; --

By any chance?
-W
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Doesn't This MySQL Statement Execute? Tom Borkin Python 5 12-19-2012 05:40 AM
Re: Why Doesn't This MySQL Statement Execute? Chris Angelico Python 0 12-18-2012 10:42 PM
PHP MySQL Web Development - Why Do You Need a PHP & MySQL ... neha shena C Programming 0 10-28-2010 06:00 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57