Results 1 to 4 of 4

Thread: How do i fix data truncated error in mysql?

  1. #1
    Join Date
    Jan 2008
    Location
    Kuala Lumpur
    Posts
    5
    Rep Power
    0

    Unhappy How do i fix data truncated error in mysql?

    Hi!
    How do i fix the error that appear in my system called
    "Data truncated for column 'designation' at row 1"

    the "designation" field is a drop down menu that enable user to choose designation that they want. here is the code for the table
    <select name="designation" size="1">
    <option selected="selected" value=''>-Select Designation-</option>
    <option value='Dean'>Dean</option>
    <option value='Assistant Registrar'>Assistant Registrar</option>
    <option value='Program Manager'>Program Manager</option>
    <option value='Lecturer'>Lecturer</option>
    <option value='Other'>Other</option>
    </select>


    My system works fine before and i didnt do any changes to it.
    Please help me...
    Thank you!

  2. #2
    Join Date
    Oct 2003
    Location
    Selangor
    Posts
    247
    Rep Power
    195
    some1 must hv change Ur table's column design or da new value is too long

    btw U shld design Ur table to store designation as Id rather than full sentence, U can save alot of table space by doin tis

  3. #3
    Join Date
    Jan 2008
    Location
    Kuala Lumpur
    Posts
    5
    Rep Power
    0

    How do i fix data truncated error in mysql

    i've changed the table field of 'designation' type from enum to varchar(20) and its work. By the way, changing the table name from designation to id didnt do any changes and still appear the 'data truncated' error to my webpage. I want the type to be 'enum' rather than varchar. Please help me on this...

  4. #4
    Join Date
    Oct 2003
    Location
    Selangor
    Posts
    247
    Rep Power
    195
    No I min store Ur designation data like below & change data type to INT, U can save alot of space from CHAR to INT & ofcos da length of data, for Ur future table design la

    <option value='1'>Dean</option>
    <option value='2'>Assistant Registrar</option>
    <option value='3'>Program Manager</option>
    <option value='4'>Lecturer</option>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How PHP and MySQL helped voter data analysis
    By saengch in forum Showcase
    Replies: 1
    Last Post: 16-01-2009, 05:47 PM
  2. save data from hyperterminal into mysql through vb.net
    By areah in forum Website Programming
    Replies: 5
    Last Post: 23-12-2008, 03:40 PM
  3. How do i display data from mysql database?
    By silentD in forum Website Programming
    Replies: 2
    Last Post: 14-01-2008, 10:16 AM
  4. Export hugh data from MySQL
    By Kongtechnology in forum Website Programming
    Replies: 3
    Last Post: 16-07-2007, 04:35 PM
  5. mysql+php : help find the error
    By progmania in forum Website Programming
    Replies: 5
    Last Post: 03-09-2003, 12:42 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30