Updating a mysql database using php
Suggestions: reduce the amount of time apache child processes stay connected to the client and how many connections before they are killed off. One way to accomplish this is: CREATE DATABASE my_database DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Then, after connecting to it from PHP you should use:mysql_set_charset("UTF8", $connection); If you don't do this, you will get ugly problems in case other software is reading and writing to the same database!!!!!!I wouldn't say this is a bug per-se, but it's something to look out for. Both are [email protected] in my win2k install, so my advice for windows is:- create a My SQL user named ODBC with no password- add localhost to ODBC user [right-click ODBC]- set schema previleges to [email protected] use mysql_connect() with no parms, or do not use ;)This turns to work also with odbc_connect:odbc_connect("my DSN", "", "") to use load data local infile function from mysql (at mysql 4.0.16, php 4.3.3), set fifth parameter of mysql_connect() to CLIENT_LOCAL_FILES(128), which based on MYSQL C API ( also mysql server support load file, check by "show variables like 'local_infile' ")Thank 'phpweb at eden2 dot com' to point this out The post from 'Graham_Rule at ed dot ac dot uk' should include the following WARNING: WARING: THE VALUES OF THESE DIRECTIVES WILL BE EXPOSED IF ANY OF THE CODE INCLUDES THE phpinfo() FUNCTION.The phpinfo() function will print these values clear as day.Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. If the PHP directive mysql.default_host is undefined (default), then the default value is 'localhost:3306'.
Updating a mysql database using php comments