Re: Problème d'insert

From: BPascal <pascal62fr(at)free(dot)fr>
To: pgsql-fr-generale(at)postgresql(dot)org
Subject: Re: Problème d'insert
Date: 2008-10-16 16:35:10
Message-ID: 48F76D3E.4030205@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

Christophe Chauvet a écrit :
> Bonjour
>
> Oui c'est normal puisqu'il faut échapper certain caractères
>
> vous pouvez utilisez la fonction pg_escape_string
> http://fr3.php.net/manual/fr/function.pg-escape-string.php

J'ai "oublié" de l'utiliser, merci, ça marche.

Avant d'entrée une donnée dans la base j'utilise:
htmlspecialchars( pg_escape_string($nom, ENT_COMPAT, "UTF-8"))
trim($nom)
pg_escape_string($nom)
et un test selon les cas
if (strlen($nom)==0)

Cordialement
--
Pascal

In response to

Browse pgsql-fr-generale by date

  From Date Subject
Next Message Christophe Garault 2008-10-16 16:45:07 Re: Utilisation de PostgreSQL pour l'authentification Apache
Previous Message BPascal 2008-10-16 16:00:23 Re: Utilisation de PostgreSQL pour l authentification Apache