GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Programming  >  PHP
Go To First  |  Previous Question  |  Next Question 
 PHP  |  Question 20 of 60    Print  
How do you insert single & double qotes in MySql db without using PHP?

  
Total Answers and Comments: 6 Last Update: August 14, 2008     Asked by: Lokesh M 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 11, 2006 18:38:23   #1  
Henry        

RE: How do you insert single & double qotes in MySql d...
& / &quote;
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 26, 2006 03:23:09   #2  
vinit sharma        

RE: How do you insert single & double qotes in MySql d...
the new fool prrof method isto use PEAR and in that use prepare() execute method , or auto execute method . this takes care of mot just quotes , but all the html characters to be stored i the db .
 
Is this answer useful? Yes | No
December 13, 2006 12:16:32   #3  
Mohamed Yusuf        

RE: How do you insert single & double qotes in MySql d...
escape single quote using forward slash ' .in double quote you don't need to escape quotes. insert as it ""
 
Is this answer useful? Yes | No
February 08, 2007 01:05:55   #4  
riskyyip Member Since: February 2007   Contribution: 1    

RE: How do you insert single & double qotes in MySql d...
there are 2 method:1. use escape back slash: " or '2. use "" or '' in the quoted string, e.g. ' it''s good' stands for : it's good, in the table.
 
Is this answer useful? Yes | No
July 28, 2008 05:01:11   #5  
akhilesh1010 Member Since: July 2008   Contribution: 4    

RE: How do you insert single & double qotes in MySql db without using PHP?
we can use addslashes function  for this


 
Is this answer useful? Yes | No
August 14, 2008 09:26:38   #6  
EllisGL Member Since: August 2008   Contribution: 1    

RE: How do you insert single & double qotes in MySql db without using PHP?
The way the question is formed - you would either:
1.) Use the MySQL CLI to perform an INSERT: INSERT INTO `myDB` (`col1`, `col2`) VALUES ('It's the best!', '"Mike" says hi!');

2.) Use another language other than PHP.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape