pascal_22 Posted October 2, 2013 Share Posted October 2, 2013 (edited) Hello to all!! I really have a problem and i can t find any solution on the web. I'M trying to import in mysql database (using phpmyadmin on windows) a .BIN file. but it doesnt work. I receive this error : MySQL a répondu: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' A?S' at line 1 Any suggestion? thanks a lot Edited October 2, 2013 by pascal_22 Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/ Share on other sites More sharing options...
jazzman1 Posted October 3, 2013 Share Posted October 3, 2013 What charset encoding are you using to get the binary sting from your DB or something else, for example? Make sure that this binary data is saved into a file under UTF-8 encoding charset without BOM, then try again I thing that's your problem. You can post out this problematic string here for testing purposes if you want it. Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452351 Share on other sites More sharing options...
pascal_22 Posted October 3, 2013 Author Share Posted October 3, 2013 Hello JAzzman, Thanks for your answer! In fact, since one year, i buy from ip2location a database that locate user from ip..... yesterday, i upgrade to a better database(more information) from ip2location. Usualy, the download has a mysql dump file but this upgrape, only have a .bin file and a .cvs file. So i thought that the .bin file was the same as mysql dumpfile... but it doesnt work... so i read the help from ip2location and they said that we need to create table and after import .csv file... When i try to import .bin file in phpmyadmin.... the char set was utf8!! The advantage of the dump file, was it automaticly create the table then import row..... does a .bin file does the same? Thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452417 Share on other sites More sharing options...
mac_gyver Posted October 3, 2013 Share Posted October 3, 2013 the .bin files are for using the modules/library API code that they provide - http://www.ip2location.com/developers/php Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452423 Share on other sites More sharing options...
pascal_22 Posted October 3, 2013 Author Share Posted October 3, 2013 Ho ok!! thanks!! I see now!!! for performance and speed.... should i use the database or a .bin file like this example? http://www.ip2locati.../developers/php thanks so much!!! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452454 Share on other sites More sharing options...
jazzman1 Posted October 3, 2013 Share Posted October 3, 2013 for performance and speed.... should i use the database or a .bin file like this example? http://www.ip2locati.../developers/php Yea, it's possible! Check out their docs. Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452477 Share on other sites More sharing options...
pascal_22 Posted October 3, 2013 Author Share Posted October 3, 2013 (edited) Ok thanks! I send a message to their support team... for asking: should i use query the database(php,mysql) or query a .bin file Which way is the best? i mean for speed,performance,less cpu usage, less memory usage....? Thanks! Edited October 3, 2013 by pascal_22 Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452480 Share on other sites More sharing options...
jazzman1 Posted October 3, 2013 Share Posted October 3, 2013 Yep, that's a good idea. Mail theme For less cpu and memory usage I'm not sure, since I checked the link provided by mac_gyver, but for speed and performance it would be possible. Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452483 Share on other sites More sharing options...
pascal_22 Posted October 4, 2013 Author Share Posted October 4, 2013 I receive a short answer We would recommend you the CSV format. So i'll continu to use it!!! Thnaks a lot to all your help!! Have a great week end!!! PAscal Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452583 Share on other sites More sharing options...
mac_gyver Posted October 4, 2013 Share Posted October 4, 2013 in general, having the complied code of a database engine searching for values in data is going to be faster than using interpreted php script for the same task. Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452585 Share on other sites More sharing options...
pascal_22 Posted October 4, 2013 Author Share Posted October 4, 2013 You right!!!! i can test it.... to testing it.. i check the execution time it takes? Quote Link to comment https://forums.phpfreaks.com/topic/282649-import-in-phpmyadmin-bin-file/#findComment-1452587 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.