SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2000
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I go to phpMySqlAdmin 2.0.1 and try to run this query I get the following error:

    MySQL said: You have an error in your SQL syntax near 'épanouir')' at line 3


    Here's the query:

    INSERT INTO donnees_bio VALUES( '50018', 'Géraldine', 'Totette', 'F',
    '1956-05-23', 'Hérpétologue', '', '', 'GRH', 'Sec', '2001-02-01',
    'ré-affectation', 'Pour me connaître et m\'épanouir');


    and here's the Table structure:

    CREATE TABLE donnees_bio (
    permission_id int(11) DEFAULT '0' NOT NULL,
    nom char(100) NOT NULL,
    prenom char(100) NOT NULL,
    sexe enum('M','F') DEFAULT 'M' NOT NULL,
    date_naissance date DEFAULT '0000-00-00' NOT NULL,
    profession char(50) NOT NULL,
    blank1 char(5),
    blank2 char(5),
    organisation char(50) NOT NULL,
    scol enum('Sec','Coll','Univ','Autre','ND') DEFAULT 'Sec' NOT NULL,
    date_reponse date DEFAULT '0000-00-00' NOT NULL,
    motif_consul enum('Sélection de personnel : concours de
    promotion','cheminement de carriere','ré-affectation','connaissance
    personnelle','autre') DEFAULT 'Sélection de personnel : concours de
    promotion' NOT NULL,
    desc_motif_consul char(100) NOT NULL,
    UNIQUE permission_id (permission_id)
    );


    Any ideas as to the error?


    here's the complete dump file: as you can see all of the other queries work except 50018:

    # Table structure for table 'donnees_bio'
    #

    CREATE TABLE donnees_bio (
    permission_id int(11) DEFAULT '0' NOT NULL,
    nom char(100) NOT NULL,
    prenom char(100) NOT NULL,
    sexe enum('M','F') DEFAULT 'M' NOT NULL,
    date_naissance date DEFAULT '0000-00-00' NOT NULL,
    profession char(50) NOT NULL,
    blank1 char(5),
    blank2 char(5),
    organisation char(50) NOT NULL,
    scol enum('Sec','Coll','Univ','Autre','ND') DEFAULT 'Sec' NOT NULL,
    date_reponse date DEFAULT '0000-00-00' NOT NULL,
    motif_consul enum('Sélection de personnel : concours de
    promotion','cheminement de carriere','ré-affectation','connaissance
    personnelle','autre') DEFAULT 'Sélection de personnel : concours de
    promotion' NOT NULL,
    desc_motif_consul char(100) NOT NULL,
    UNIQUE permission_id (permission_id)
    );

    #
    # Dumping data for table 'donnees_bio'
    #

    INSERT INTO donnees_bio VALUES( '50008', '', '', '', '0000-00-00', '',
    '', '', '', '', '2001-01-28', '', '');
    INSERT INTO donnees_bio VALUES( '50010', 'François', 'Bernatchez', 'M',
    '1948-03-15', 'Psychologue', '', '', 'Gestion Carrières', 'Univ',
    '2001-01-28', 'cheminement de carriere', 'Je veux chercher à me
    connaître à fond');
    INSERT INTO donnees_bio VALUES( '50011', '', '', '', '0000-00-00', '',
    '', '', '', '', '2001-01-30', '', '');
    INSERT INTO donnees_bio VALUES( '50013', 'Justin', 'Essais', 'M',
    '1948-03-15', 'toto', '', '', 'toto', 'Univ', '2001-02-01', 'Sélection
    de personnel : concours de promotion', 'Justin essais');
    INSERT INTO donnees_bio VALUES( '50017', 'Gérard', 'Toto', 'M',
    '1525-01-25', 'Gériâtre', '', '', 'rentier', 'Univ', '2001-02-01',
    'cheminement de carriere', 'Me reconnaitre');
    INSERT INTO donnees_bio VALUES( '50018', 'Géraldine', 'Totette', 'F',
    '1956-05-23', 'Hérpétologue', '', '', 'GRH', 'Sec', '2001-02-01',
    'ré-affectation', 'Pour me connaître et m\'épanouir');
    INSERT INTO donnees_bio VALUES( '50020', 'sdfskjfdkj', 'sddfsdlfk', 'M',
    '1948-06-05', 'slkfjs', '', '', 'sfdklsjdf', 'Sec', '2001-02-02',
    'Sélection de personnel : concours de promotion', 'fdssafs');
    INSERT INTO donnees_bio VALUES( '50031', 'Yanick', 'Proulx', 'M',
    '1977-10-11', 'Agent, centre d\'appel', '', '', 'QuébecTel', 'Coll',
    '2001-02-06', 'cheminement de carriere', '');
    INSERT INTO donnees_bio VALUES( '50032', 'Yanick', 'Proulx', 'M',
    '1977-10-11', 'Agent, centre d\'appel', '', '', 'QuébecTel', 'Coll',
    '2001-02-06', 'cheminement de carriere', '');
    INSERT INTO donnees_bio VALUES( '50021', 'Francine', 'Fournier', 'F',
    '1954-08-05', 'Secrétaire de direction (affectation temporaire)', '',
    '', 'QuébecTel', 'Sec', '2001-02-07', 'cheminement de carriere', '');

    # --------------------------------------------------------

    The only difference I see in this query and the others is the ' in m\'épanouir'. I have tried to scape the ' with the \ but this is obviously not working.

    Any help would be greatly appreciated on this matter,


  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First thing I would say is to telnet in or ssh in to your server and run the query from the the command line, so you an get the error that is produced. And then if that doesn't help come back here and post the error that you get.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •