jisisv
2810Messages postés
18 mars 2001Date d'inscription
29 mai 2012Dernière intervention
12 sept. 2003 à 09:21
Utilise addslashes
<?php
print(addslashes("Salut l'ami\n"));
?>
Salut l\'ami
////
mysql> describe x;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| a | int(11) | YES | | NULL | |
| b | char(10) | YES | | NULL | |
+-------+----------+------+-----+---------+-------+
2 rows in set (0.00 sec)
mysql> insert into x values(1, 'L\'apostrophe');
Query OK, 1 row affected (0.00 sec)
mysql> select * from x where a=1;
+------+------------+
| a | b |
+------+------------+
| 1 | a |
| 1 | L'apostrop |
| 1 | L'apostrop |
+------+------------+
3 rows in set (0.03 sec)
Johan
The software said "Requires Windows98, Win2000, or better,
So I installed Unix.