PDA

View Full Version : Insert to DataBase With PHP Problem


SorentoUltimate
09-17-2010, 11:26 PM
Hi all

i have that php file
<?php

function import_poi_sections()
{
global $vbulletin, $db;

$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (1, 'Sex Activities', 1254009600, 1254009600)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (2, 'Super Markets', 1282521600, 1282521600)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (3, 'WiFi Spots', 1281484800, 1281484800)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (4, 'Ακτοπλοϊκές Εταιρείες', 1284336000, 1284336000)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (5, 'Αρχείο Σημείων', 1269475200, 1269475200)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (6, 'Αρώματα-Ομορφιά-Κομμωτήρια', 1282089600, 1282089600)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (7, 'Αυτοκίνητα', 1284681600, 1284681600)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (8, 'Βενζινάδικα', 1284249600, 1284249600)");
$db->query_write("INSERT INTO `" . TABLE_PREFIX . "mytable` VALUES (9, 'Βιβλία-Χαρτικά', 1284681600, 1284681600)");

}

?>
the lines 1,2,3 import ok

at the lines 4,5,6,7,8,9 in second field put nothing and not the data from insert command !!!

Any Idea?????

kh99
09-17-2010, 11:43 PM
Maybe I'm just stating the obvious, but it seems the greek characters are causing the problem, so it's an issue with character set configuration somewhere.

SorentoUltimate
09-17-2010, 11:45 PM
Maybe I'm just stating the obvious, but it seems the greek characters are causing the problem, so it's an issue with character set configuration somewhere.

i also believe the greek are the problem, all are set to utf-8
no problem, work ok.

but when i try to insert data to sql with php i have the problem !!!

any idea?