First of all, Im sorry for my bad English, and thank you all for view my cuestion.
I want to sync two Mysql, but I can't get it work with blob types.
The two connections are equal in username and password.
$conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS) or die();
mysqli_select_db($conn, DB_NAME) or die();
mysqli_set_charset($conn, 'utf8') or die();
// db connection string variables
$connEco = mysqli_connect("192.168.20.2", DB_USER, DB_PASS) or die();
mysqli_select_db($connEco, DB_NAME) or die();
mysqli_set_charset($connEco, 'utf8') or die();
$sql="DROP TABLE IF EXISTS users_in_fmd";
$rs = mysqli_query($connEco, $sql)
or die(mysqli_error($connEco));
$sql="CREATE TABLE IF NOT EXISTS `users_in_fmd` ( `UsersInFmd` int(10) NOT NULL AUTO_INCREMENT, `SucursalId` int(10) NOT NULL, `UserId` int(10) NOT NULL, `FMD` mediumblob, `FingerIndex` int(2) NOT NULL, PRIMARY KEY (`UsersInFmd`), KEY `UserId` (`UserId`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0";
$rs = mysqli_query($connEco, $sql)
or die("Error 1");
$sql="SELECT UsersInFmd, SucursalId, UserId, FMD, FingerIndex FROM users_in_fmd";
$rs = mysqli_query($conn, $sql)
or die("Error 2");
while($row = mysqli_fetch_array($rs))
{
//The row['FMD'] is the data.
$sql3 = "INSERT INTO users_in_fmd (`UsersInFmd`, `SucursalId`, `UserId`, `FMD`, `FingerIndex`) VALUES ('".$row['UsersInFmd']."', '".$row['SucursalId']."', '".$row['UserId']."', '".$row['FMD']."', '".$row['FingerIndex']."')";
$updateregistro = mysqli_query($connEco,$sql3) or die("Error 3");
}
I have try to get the FMD data in HEX() from mysql, I have try to UNHEX() when is inserted, but all is the same result, I cant import the blob data into the MySql database.
Any Ideas ?