MySQL Forums
Forum List  »  PHP

Re: PHP inserts gobbledygook into mySQL when data is not English
Posted by: Peter Brawley
Date: September 26, 2018 01:55PM

After MySQL query calls, always call mysqli_error($con) to see exact msgs. Also collect all warnings eg ...

<?php 
$r = mysqli_query($con, "..."); 
$j = mysqli_warning_count($con); 
if ($j > 0) { 
    $e = mysqli_get_warnings($con); 
    for ($i = 0; $i < $j; $i++) { 
      var_dump($e); 
      $e->next(); 
    } 
} 
?>

or by calling mysqli_query( $con, "show warnings" );

From what you say, it looks likely that the sproc and/or the java app are not setting charset correctly for the data.



Edited 1 time(s). Last edit at 09/26/2018 01:56PM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
Re: PHP inserts gobbledygook into mySQL when data is not English
September 26, 2018 01:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.