www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Query with an accent

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    233

    resolved [RESOLVED] Query with an accent

    I have a query to search for a name in a directory but there is an accent in the name and is not returning any results.

    PHP Code:
    $query "SELECT * FROM directory WHERE name=\"$name\""
    if I echo this I get:

    SELECT * FROM directory WHERE name="Lorquet, Sébastien"

    This returns nothing.

    In the database the name is as is and I checked this. It finds all other data except for the two entries that have an accent.

    I have also tried putting this code in

    PHP Code:
    header ('Content-type: text/html; charset=utf-8');
    include(
    "../connectdb.php");
    mysql_set_charset("utf8"); 

    but then I get the following results: Lorquet, SĂ©bastien

    I have also tried changing the setting in the table to utf8_general_ci and it still did not work.
    Last edited by beylah; 03-31-2014 at 11:42 AM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles