kodlama ve PHP veritabanı yedekleme komut kaçan

0 Cevap php

I tried lots of scripts to backup my mySQL database but they all fail..
phpMyAdmin is the only one that escapes my strings like it should.
What is wrong here?

In some strings in my database I have international characters like "é" etc. The phpMyAdmin dump also shows me also things like "\r\n", that seem to break the scripts.

Is this an encoding problem? Should I not have "é" in my database in the first place?
All this encoding, escaping is way above my head, I am always struggling with this. I just want everything human readable in my database and human readable parsed in the browser. Why is this so difficult?
I try to set everything to UTF-8, but when I send things up like with json_encode() I have all this \u00e9\ in the database.

Ben bu bağlantı gider snipped bulundu:

$tableName  = 'albums';
$backupFile = 'albums.sql';
$query      = "SELECT * INTO OUTFILE '$backupFile' FROM '$tableName'";
$result     = mysql_query($query);
if (!$sql_res) { 
    echo "error";
}

Tarayıcı "hata" çıktılar

0 Cevap