Category Archives: mysql

Building an interactive website using CakePHP - Part 1

Step 0:
For starters, I am following the example - building a blog using CakePHP in the CakePHP Manual. From there I’ll make it do what I want, but I’ll also want to add other functionality. That will likely take a while, so you’ll have to wait. Part 1 covers the development done on day […]

php-mysql connection charset fix

In my earlier post php-mysql connection charset fix, I mentioned I was having issues with enforcing an UTF8 charset. I found the solution:
@$conn = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
// or die(mysql_error());
if (!$conn||mysqli_connect_errno())
{
throw new Exception(’Could not connect to database server:’.
mysqli_connect_error());
}
else
{
$conn->query( “SET NAMES ‘utf8′” );
$conn->set_charset(”utf8″);
return $conn;
}

Whizzoo Iñtërnâtiônàlizætiøn

Whizzo now with Iñtërnâtiônàlizætiøn.. my girlfriend will be happy! And it seems that some of the articles I quoted in my earlier post Portable php-mysql connection charset fix may have held some truth. The solution, eventually had something to do with the following two lines of PHP code.
$conn->query( “SET NAMES ‘utf8′” );
$conn->set_charset(”utf8″);
Which need to be […]

Portable php-mysql connection charset fix by Advies en zo :: Meedenken en -doen

I’m having some interesting problems with charsets at Whizzoo.com, in particular getting the characters with question marks to represent real characters. Unfortunately I think a lot of the Iñtërnâtiônàlizætiøn issues are probably removed from the database now and replaced with issues with PHP string functions, i.e. remove special characters and to lower case. I’m hoping […]

MySQL Date types and other misc queries

Having a real bother trying to get the data to insert into my custom built tables (which I might add are rather ugly!) - but for now it is ok, working is the functionality I desire most. Unfortunately, I’m beginning to have difficulty focusing, so it has possibly reached time to sleep.
But first, I want […]