asmith Posted May 4, 2008 Share Posted May 4, 2008 hey guys i have an awful lot of queris in my email . like : insert into ... insert into ... which is impossible to do one by one. so i wrote : <?php $db = mysql_connect("localhost","... mysql_select_db("db",$db); $a = "insert into... insert into... insert into..."; // queries goes here $b = explode("\n",$a); foreach($b as $query) { mysql_query($query,$db) or die(mysql_error()); } echo "these queries were executed : <br />"; print_r($b); ?> it works fine. except some of the queries has unicode characters, which makes problem wen saving the file. but when i save te file as a unicode format, my brower only shows a white page and does nothing . any idea? Link to comment https://forums.phpfreaks.com/topic/104062-unicode-queries/ Share on other sites More sharing options...
effigy Posted May 5, 2008 Share Posted May 5, 2008 Is the database using UTF-8? How are these characters encoded in your file? Link to comment https://forums.phpfreaks.com/topic/104062-unicode-queries/#findComment-533487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.