Menu

Snippets

Yet another programmer blogging about code

Posts Tagged ‘mysql’

Sort WooCommerce products first in search results

Thursday, December 18th, 2014

When shoppers search a WordPress website, you want them to find products first before listing any articles and pages. And it’s surprisingly easy to achieve, with a simple filter hook. (more…)

Classic ASP, MySQL and UTF-8

Thursday, January 3rd, 2013

Countless references on the web will tell you that you can access Unicode data in MySQL by setting the connection character set to utf8. Mostly, they tell you to execute the statement “set names ‘utf8′” as the first statement in your connection. But when you are accessing MySQL from Classic ASP using the MySQL ODBC driver, you get an error: “SET NAMES not allowed by driver”. Here’s how you actually do it in Classic ASP. (more…)