How can I insert values with a single quote (')

How can I insert a values as ABC?

Published by: LuKKa on October 6, 2010 12:48

LuKKa says:
I want to insert like this: -.
INSERT INTO myTab values ("it is to belong to ABC '");

So how do I do?

In an old style, you can do

insert into mytab valeus('This is belong''s to ABC''s');

Tags: Database

Similar Questions

  • How can I insert values textarea one both in the database?

    I have a simple form:

    Select list - populated by a recordset that gets the list of technicians.   In this format: Label - > name of Tech value - > ID Tech

    TextArea - paste zip codes in this tech services.    In this format: 12345,12346,12347, etc...

    When I want to send the form, I want to take all postal codes and insert them into the database as a single record each with the id of the tech of the selection list.

    The code I have is:

    $zipcodes = explode(",", $_POST['textarea']);
    $countZips = (count($zipcodes));
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    foreach($zipcodes as $key=>$value)
    {
    
    
    while ($countZips >= 1) {
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }
    
      $insertSQL = sprintf("INSERT INTO zip_zip (zip_code, tech_id) VALUES (%s, %s)",
                           GetSQLValueString($value, "int"),
                           GetSQLValueString($_POST['select'], "int"));
    
    
      mysql_select_db($database_localhost, $localhost);
      $Result1 = mysql_query($insertSQL, $localhost) or die(mysql_error());
              $countZips--;
    }
    //Done value exists
    //Now moving to next page when done
    } 
              $insertGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $insertGoTo));
    }
    //END
    

    The question is - Let's say I have paste 105 postal codes into the text box.   It inserts the FIRST postal code 105 times in the database instead of insert postal code 105 individually.

    No idea what I'm doing wrong here?

    Thank you!

    You loop does. Delete this While loop, it is not necessary, and you don't need to follow the count. The foreach loop does all the work.

  • How can I insert an image with password?

    I just got my computer back from the repair shop.  Then I start here with my Windows 8.   How can I insert an image with your password?  What confuses me, is that when I select a picture for my password, I have three gestures.  I don't know what are these actions?  I started to change the picture for my password.  I browse my files and select a picture.  I clicked on the box that says something like this is the image you have selected.  I clicked Yes.

    Only the next day, he said I must draw three gestures.  I don't know what they want.  Please help me what I have to do...

    Hello

    Please refer following guide to implement Image password on your Windows 8:

    http://www.kapilarya.com/Tip-set-up-change-or-remove-picture-password-in-Windows-8-1

    Hope this helps, good luck :)

  • Please how can I insert a value of richinputtext in the database string attribute

    Please how can I insert a value of richinputtext in the database string attribute

    If you can get its value at the bean and then call your insert statement to put it in the DB table

    and if you want to know about the execution of SQL query

    then check - Ashish Awasthi (Jdev/ADF) Blog: SQL to run in an ADF Application using DataSource DBTransaction & JDBC query

    Ashish

  • How can I insert and delete pages from a pdf with acrobat 10 X?

    How can I insert and delete pages from a pdf with acrobat 10 X?

    Otherwise, don't forget that your page thumbnails Panel is open and click the icon highlighted in this image, just under the title.

    You will see a drop-down list with the options you need.

  • How can I insert commas in a string to a number?

    Here's the process I use to

    generates a numeric string in an Acrobat form:

    var A = this.getField("fieldname").value * 1000000000
    var B = this.getField("fieldname").value * 1000000000
    var C = this.getField("fieldname").value * 1000000000
    var D = this.getField("fieldname").value * 1000000000
    var E = this.getField("fieldname").value * 1000000000
    var F = this.getField("fieldname").value * 1000000
    var G = this.getField("fieldname").value * 1000000
    var H = this.getField("fieldname").value * 1000000
    var I = this.getField("fieldname").value * 1000000
    var J = this.getField("fieldname").value * 1000000
    var K = this.getField("fieldname").value * 1000
    var L = this.getField("fieldname").value * 1000
    var M = this.getField("fieldname").value * 1000
    var N = this.getField("fieldname").value * 1000
    var O = this.getField("fieldname").value * 1000
    var str = A - B - C - D - E + F - G - H - I - J + K - L - M - N - O

    For example, the resulting string is: How can I insert commas so the chain will read from 237036054000: 237,036,054,000?

    The number string is not always the same length so I need to add commas to the right. For example, the number may be: 7,234,887,000 or 124,345,000. The only constant is that the numbers will end in "000" as there are no hundreds in the sequence, I work with.

    I have to add commas to the strobila, so I can break the string up in the same type of components that I started with. I already part, but I need to insert commas as a separator for the second half of work.

    Thanks much for any help you can offer.

    Steve

    What is a custom calculation script? If so, do you have to checked to make sure that the field calculation order is correct?

  • How can I restart firefox with the same tabs and windows?

    How can I restart firefox with the same tabs and windows?

    It is not in the file menu or tools. I get nothing when searching for help. FF still knows how to do it, say to update extensions.

    I know that I can do by saving my session, coming out, reboot and restore the session but is there a single command to do this?

    Thank you. -David

    I have attached a screenshot showing how to select restore automatic session just above the setting of the Home Page where it says "When Firefox starts".

    With this set, you can restart Firefox manually out using the menu-

    • "3-bar" menu button > button "power".
    • (menu bar) File > Exit

    -and then restart Firefox.

    If you want a real reboot with a click of button, you can check something on the Add-ons site: https://addons.mozilla.org/firefox/

  • Hello, how can I insert a PDF file into a Pages Document?

    How can I insert a PDF file into a Document that I wrote with Pages? I know that I used to do with Windows Word.

    Drag it out of the Finder.

    Peter

  • How can I create VI with inputs that run immediately when the update?

    I'm using LabView for controlling stepper motors. I would create a VI with a front panel that has 4 arrows, 2 per engine. My goal is to be able to run the VI and then press a button to move the engine.

    I created separate VI for each funcition of engines - one vi to set current operations, to determine the current travel, another to move up by a certain amount and so on. Work of these vi and I can move and adjust engines, but only by running separate VI.

    How can I combine them into a single VI and make them run to the pressure of a button or the change of a property? An example would be to establish a new current holding company and place the operation current vi run immediately and send the order to the engine. Then continue to press the arrow keys without having to hit 'run' on an another vi.

    Thank you very much


  • How can I insert an mp3 music file in Windows Movie Maker?

    How can I insert an MP3 of the music on Windows movie maker film?  I downloaded this song three times from Amazon.com... the file is fine.  Yet, when I'm in Windows Movie make and attempt to insert of the song, I get a message saying that the file is invalid or damaged.  The file is fine.  I'm able to import OTHER songs without problem to my film.  BUT I want this song in particular one and can't make it work.

    Convert MP3 to WMA format before importing
    in Movie Maker and you should have a better result.

    There are many freeware converters available on
    the net... the following examples may be worth a try:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    * Proceed at your own risk *.

    (1) format Factory
    http://www.pcfreetime.com/
    (the file you want to download is: > FFSetup270.zip
    (FWIW... installation..., you might want to
    Uncheck all of the boxes on the last screen)

    First... after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your MP3 files on the main screen...

    Select "while"WMA"/ OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Here's another free download:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (2) Koyotesoft "Free MP3 WMA Converter".
    http://www.koyotesoft.com/indexEn.html
    (FWIW if you install the converter, you can
    Uncheck offerings from Yahoo and Dealio) (also... you
    may want to uncheck the CD Ripper and the Easy
    MP3 Cutter)

    After installing the program... open and drag and drop
    your audio files on the main screen...

    Choose a backup folder (path of output). Or just leave...
    "Save to the directory the file" checked and the new
    files will be saved in the folder with the current files.

    Choose a format... WMA.

    Left, click Convert.

  • State BBM BBM message - How can I insert an emoticon?

    I have a classic Blackberry. How can I insert an emoticon in my status message? Not 'personal message '. With my previous BB's "BOLD" if I clicked on the button "symbol" on the keyboard, I could insert an emoticon.

    I see what you mean now, when you attempt to add a custom status no emoticon icon is present: s

    The only suggestion I can make is to enter the shortcode emoticons such as which will turn into the emoticon. The list shows the shortcude after you save the new status, but when switch you to him, shortcodes will appear as corresponding emoticons.

    I'll share this with the BBM team so we can consider to add this option later updated to BBM.

    Let me know if help and thanks for being patient with me

  • How can I insert image into the image in adobe first pro cc 2015

    How can I insert image into the image in adobe first pro cc 2015. I want to put a fixed image on a video sequence as a pip.

    1 import the photo into your project (CTL-I or just drag & drop in the project Panel)

    2 dag photo imported on your timeline in a track located above the video you already have.

    3. click the clip of the photo in the timeline panel and then click on the control panel of the effect of the Source Panel tab.

    4. here you can resize, move, and even rotate the picture of the "query" fixed effect.  You can use the sliders or click on the area next to the word "Query" and use your mouse to do everything from the program Panel.

    Good luck and have fun.  BTW: once you get it you like, you can even animate the PIP to fly in or any other movement, you can think of with keyframes.

  • How can I insert a table created in Excel on the Web in Adobe Muse [was: Hello,]

    Hello

    I have a question, How can I Insert a table with features created in Excel for the Web in Adobe Muse.

    Thank you A. Fischer

    That is right. It is most likely will not get a glimpse. You may need to check in a real browser.

  • How can I insert instructions/text in a PDF form text field that can be typed by the end user?

    How can I insert instructions/text into a text form field that can be typed by the end user? As the screenshot attached.

    I already have a PDF (not created by me) I have to edit but cannot work out how to enter into new fields of text instructions, I create. I tried to do in InDesign, but the text gets just covered by the blue shape box when you view the final PDF file.

    Screen Shot 2015-08-07 at 10.53.10.png

    Follow the instructions as default value for the field and then reset the form.

    See also: is there a way to add instructional text to my text field that disappears when you click on? (PDF Forms)

  • I have Adobe Acrobat Pro XI.  I went to special characters from the Edit menu and choose some emoji as Favorites, but I can't understand how to insert in the document.  How can I insert special characters into a document?

    How can I insert emoji or other special characters in a document using Adobe Acrobat Pro XI?  I went to special characters from the Edit menu and may not understand how to insert the special character in the document.

    He's not that kind of editor. You can use the characters in a font. If you can select a font with the emoji, which fits into the case, and then enter the characters, it can work.

    This suggests that you try to do TOO MUCH with a PDF file. It is a common thing, but the message should be: everything simply because you can edit a PDF file, does not mean that it is the most effective way for you to do your job.

Maybe you are looking for

  • Why did I lost all of my boxes in Yahoo mail?

    Hello, recently my Yahoo Mail went bonkers and I lost all of my boxes. You know the ones that I would use to check what emails I would delete etc, etc. It looks good on my other computers and on this computer through Google chrome.

  • How to change the proxy seting

    In my phone andy for net surfing on WiFi id of the proxy is necessary as much by the University but a lot of proxy are available and my id is on a single power of Attorney given then how change the proxy do?

  • Satellite A100-906: Express player media use the reinstallation of the operating system

    Hello I use a Toshiba Satellite A100-906. I did NOT know about what express Media Player recovery cd's and I've never used it. But now I want to know what's the point of use. In any case I had to format my laptop and I have used the recovery cd. So n

  • Qosmio F45-AV425 - can I use 800 Mhz memory modules

    I intend to remove the standard 2 GB came with my laptop.My question is since the fsb running at can 800 mhz I buy 4 GB 800 MHz? (I don't know if the motherboard can be considered). If I can't do this sick then just buy at 667 mhz sodimm.Any help wou

  • HP pavilion 550-036: upgrading a power supply Hp 550-036

    I buy a Hp Pavilion computer 550-036 and discovered that feeding electric 180w, this computer can be upgraded to a higher power supply.  I have other computers and their power is 300w, it's the lst computer, I've seen with low power