Archive for the ‘mysql’ Category

total mysql rows

Turns out our Mysql server at work is a little bigger than I thought: Databases 75 Tables    1,549 Rows      1,018,085,348 However over the last couple of months, we’ve only averaged 130 queries/second Hacked up PHP to gather stats: class MysqlCounter {     public function __construct($host, $username, $password)     {   [...]

Posted by Matthew on September 9th, 2009

Filed under mysql, php, programming | No Comments »

Now with added Slicehost

This website is now hosted on Slicehost (along with section99.net). It’s a little early to know how it will turn out, but so far I’m loving having not only a shell, but root access. Signing up was completely painless and the the VPS was provisioned within minutes with several different operating system options (though I’m [...]

Posted by Matthew on January 26th, 2008

Filed under linux, mysql, php, website | No Comments »

Very Simple (Pretend) SQL Paramaters

<?php /*     Some hacked up code for Very Simple (Pretend) SQL Paramaters     — For when you don’t have PDO, or just can’t be bothered     Examples:         >>> SQL("SELECT * FROM users WHERE id=? AND name LIKE ?", 123, ‘"123\"’);         SELECT * FROM [...]

Posted by Matthew on December 10th, 2007

Filed under mysql, php, programming | No Comments »

qpsmon v0.1

This is a simple script that will print the average qps (using a specidied peri0d) for one or more MySQL databases. If doesn’t have many practical uses, but it’s fun to watch when running large imports or exports. Screenshot <?php /*     qpsmon.php  v0.1     This is an (extremely) simple script that will [...]

Posted by Matthew on October 8th, 2007

Filed under mysql, php, programming | No Comments »

MySql: Always learning something new

mysql>  SELECT "50" > 100, 50 > "100", "100" > 50, 100 > "50", "100" > "50", "50" > "100"; +————+————+————+————+————–+————–+ | "50" > 100 | 50 > "100" | "100" > 50 | 100 > "50" | "100" > "50" | "50" > "100" | +————+————+————+————+————–+————–+ |          0 |   [...]

Posted by Matthew on July 24th, 2007

Filed under mysql, php, programming | No Comments »

Working with MySQL

matthewd@carbonara:~$ mysql Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 2792799 Server version: 5.0.38-log Gentoo Linux mysql-5.0.38 Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer. mysql> use b3 Reading table information for completion of table and column names You can turn off this [...]

Posted by Matthew on July 2nd, 2007

Filed under mysql | 2 Comments »