Results 1 to 9 of 9

Thread: MySQL Database

  1. #1

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372

    MySQL Database

    Hi guys,

    One of the tables in my database has been set to LongText. I need to be able to add characters like £ and / so what do I need to change it to?

    Ta.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  2. #2

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Code:
    [if (input_verification($description,"^[[:alnum:][:space:][:punct:]]+$")) {$error1=1;}
    What do I need to add to this to include other characters?
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  3. #3
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    longtext should take anything. if you change it just change it to TEXT or varcahr. but varchar is limited to 255 chars unlike TEXT.

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I'm with phpman on this. I've never had a problem inserting any character into any type of text or char field.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    The database is for shows, so it needs to be longtext for the long descriptions. Now I have to add the ticket prices after the description but I get an error if I use £.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  6. #6
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    change it to TEXT and see what it does.

    I don't believe it is that it is erroring on, can you show us the error and the code to insert it?

    besides what you have already posted.

  7. #7
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Try inserting the ascii value for it, ie o or whatever it happens to be. The webpage will still display it as £.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372
    Thanks Hobo, I used £ and it works fine.

    phpman, if I change it to text what's the max number of characters it will take?
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

  9. #9
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    TEXT, I believe, will hold like 65K

Posting Permissions

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



Click Here to Expand Forum to Full Width