#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    San Antonio, Texas, USA
    Posts
    23
    Rep Power
    0
    Well while entering a new entry into my MySQL table I came across a problem. It seems every time I try to enter a ' (aposterphe) MySQL comes up with an error message. Is there a way to allow aposterphes in my tables? It is rather important because I store alot of review in my database which cantain alot of aposterphes.

    Thank You
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    If you were inserting a string named $val you could run a function called addslashes before you input it:

    $val = addslashes($val)

    If you are running the insert from the command line just stick a behind the apostrphe
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    San Antonio, Texas, USA
    Posts
    23
    Rep Power
    0
    I'm using a program called phpMyAdmin 2.0.5, I just click insert and it gives me a form so i can insert all the info into the table. I tried the ' and it diden't work, I still get the error message. I didn't get what you were talking about in the first thing u said I could do(I'm kinda new at this) any help would be appreciated.

    Thank you
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    I have the same program on one of my servers and I am able to add records with apostophes fine, maybe it is the type of field you have, what type of field are you trying to put the apostrophe in?
  8. #5
  9. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    I'm using a program called phpMyAdmin 2.0.5, I just click insert and it gives me a form so i can insert all the info into the table.I tried the ' and it diden't work,
    >>


    yea, you can escape from the special characters using "" slash in mysql also.you should put that before your "'".


    eg:

    "INSERT INTO tablename(fieldname) values ('i'm new to phppp.but i can't do it')";

    i think that will work...


    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited August 02, 2000).]
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    San Antonio, Texas, USA
    Posts
    23
    Rep Power
    0
    Thanks for all the help, ' worked.

Similar Threads

  1. div style="overflow: scroll;"
    By slydero in forum HTML Programming
    Replies: 8
    Last Post: October 26th, 2004, 10:54 AM
  2. row not inserting at end of table
    By sweetpotatoe in forum PHP Development
    Replies: 9
    Last Post: December 15th, 2003, 02:07 PM
  3. How to allow user to edit row in MSFLEXGRID?
    By hbcontract in forum Visual Basic Programming
    Replies: 1
    Last Post: October 18th, 2003, 03:38 AM
  4. <THEAD> not printing across multiple pages
    By allanmcc in forum HTML Programming
    Replies: 2
    Last Post: September 29th, 2003, 09:47 PM

IMN logo majestic logo threadwatch logo seochat tools logo