SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cut & paste into a TEXT column type

    I have recently built a Content Management Sytem site that is migrating from an old site.

    I can cut & paste OK when the form text field enters the data into the database where there is a VARCHAR column type but when trying to do the same into a TEXT column type I get this error message
    Error updating staff member: You have an error in your SQL syntax near 'to The Cambridge Urban History of Britain , vol. 3 1840-1950 (2000). She is curr' at line 7
    This error is actually half way down the text I am trying to enter.

    I know that TEXT has a maximum length of 65535 chars but this should easily be enough and if I manually type the text it works fine.

    Can anyone tell me why this is happening please.

    Thanks

  2. #2
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just realised that I need addslashes

  3. #3
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    mysql_real_escape_string() might be a bit better (assuming you're using MySQL).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •