Results 1 to 7 of 7

Thread: [RESOLVED] mysql_result issue (I think)

  1. #1

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Resolved [RESOLVED] mysql_result issue (I think)

    Hi all!

    I've got names in latin stored on mysql so when I try to retrieve them using mysql_result to display them using a combobox (<select>), in comes scrambled. For instance, "María Peña" shows like "MaraPea".

    Any ideas?

    BTW, it looks just fine inside the tables...
    The biggest man you ever did see was once just a baby.

    Bob Marley

  2. #2
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    Re: mysql_result issue (I think)

    What is the charset used for the page containing the select box. I mean the meta tag <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    I guess it has something to do with the parameter you give for charset.

  3. #3

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Re: mysql_result issue (I think)

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    The biggest man you ever did see was once just a baby.

    Bob Marley

  4. #4
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    Re: mysql_result issue (I think)

    I believe it has something to do with the charset thing, but I am not sure which charset to use. Try charset=iso-8859-1.

  5. #5

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Re: mysql_result issue (I think)

    Didn't work. How many charset re there?
    The biggest man you ever did see was once just a baby.

    Bob Marley

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: mysql_result issue (I think)

    Use mysql_set_charset to specify the connection character set to match that used by the table.

    The manual page has alternative functions if you're using an older version of PHP.

  7. #7

    Thread Starter
    Addicted Member _Yoyo's Avatar
    Join Date
    Apr 2001
    Location
    Dominican Republic
    Posts
    187

    Re: mysql_result issue (I think)

    I had to redefine the tables and tell MySQL to use utf8 as charset, then use the utf8_encode() function to display the data the way I want it. Thanks anyway!!!
    Last edited by _Yoyo; May 19th, 2008 at 12:07 PM.
    The biggest man you ever did see was once just a baby.

    Bob Marley

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