אשכול: קידוד ב-mySQL
View Single Post
ישן 06-03-08, 12:41   # 3
ahoy
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 340
שלח הודעה באמצעות MSN אל ahoy

ahoy לא מחובר  

כבר כתבתי סקריפט PHP שעושה המרה בעזרת ICONV (אחרי ש-html_entity_decode גם לא עבד) באותה הטבלה וזה לא עבד:

$fieldsquery = "select * from ".$db.".".$table."";
$fields_result = mysql_query($fieldsquery);
$num_fields = mysql_num_fields($fields_result);

for ($j = 0; $j < $num_fields ; $j++)
{

$column = mysql_field_name($fields_result, $j);

$query = "select ".$column." from ".$db.".".$table."";
$result = mysql_query($query);
$num_result = mysql_num_rows($result);

for ($i = 0; $i < $num_result; $i++)
{
$thing1 = mysql_result($result,$i);

echo $thing1.'<br>';

//$thing2 = html_entity_decode($thing1, ENT_QUOTES, 'utf-8');

$things2 = iconv("windows-1255", "UTF-8", $thing1);

echo '<br>'.$thing2.'<br>';

$queryreplace = "update ".$db.".".$table." set ".$column." = '".$thing2."' where ".$column." = '".$thing1."'";
echo $queryreplace."<br>";
mysql_query($queryreplace);
}


... מה המשמעות של SET NAMES לקידוד? היכן זה אמרו להכנס?
  Reply With Quote