Friday, 15 March 2013

php - SQL special text escaping -


I want to include the following four lines in a database:

[Sources ] Prices (6, 'ar', '@ # Ido @ / 60 * @ # Órabér @ * @ # Torzítás @'); [Sources] values ​​(7, 'Ido', 'Ceil (((@ # Összhossz @ / 1000) / @ ~ Előtolás @) * 100) / 100 + Ceil ((@ # Lyukszám @ * @ ~ Lyuk. Ido Putting in @ / 60 + @ # Anyagtényező @ * @ # Lyukszám @) * 100) / 100 '); [Sources] values ​​(8, 'Önköltség', '(@! Áramár / H @ + @! Csarnokbér / H @ + @! Munkás órabér @ + @! Szervízköltség @ + @ ~ GAZ fogy. @ * @ # Vágógáz Putting in AR @ 3 * @! N2 (m3) @) / (@ ~ alotolus @ 60) '); [Sources] Insert values ​​(9, Lyukoncoltseg 'Lemjhwast @. @');

It was exported from a SQLite database, and I want to insert them into the SQL database server Vamp. Can anyone help me, how to avoid these strings?

The arnold

WAMP in MySQL, so I Let < / Em> You are asking how to do those INSERTs on the MySQL database.

Get rid of brackets around the table name.

Setting the character set encoding in the source (probably UTF8) bytes:

  ⚈ (Excluded) mysql interface: mysql_set_charset ('UTF8'); (Assuming PHP 5.2.3 and MySQL 5.0.7) Note: "mysql_" interface is deprecated ⚈ MyScillie interface: mysqli_set_charset ('utf8') function. Mysqli_set_charset ⚈ View PDO interface: Set the charset attribute of the PDO DSN  

No comments:

Post a Comment