File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql help

 
Jardel Tan
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i would like to know how to insert a statement like
"i'm " into mysql table
insert into table values ('I'm')
 
Yogen Vadnere
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please try following....
insert into table values ('I''m')
 
kim jungil
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jardel Tan:
hi
i would like to know how to insert a statement like
"i'm " into mysql table
insert into table values ('I'm')

you can try like this 'I\'m'
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A third way (and definitely my favourite) use PreparedStatements - this lets each database driver type take care of the specifics for escaping data.

Dave
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic