MySQL »

[30 Dec 2008 | No Comment | ]

I looked through the documentation on MySQL and it looks like they removed the “rename database” option. Here’s a workaround:

mysqladmin create [Name of new database]
mysqldump –opt [Name of old database] | mysql [Name of new database]

View More...

MySQL »

[11 Dec 2008 | No Comment | ]

Here’s a quick reference to reset the MySQL auto_increment field to 1 and delete ALL rows in a table. This is useful in case you had to do some testing and wanted to reset the primary key field back to 1 and clear out the table.

truncate table [NAME OF TABLE]

If you don’t want to wipe out the table, you can reset the auto_increment by using:

alter table [NAME OF TABLE] auto_increment=1

View More...

Featured »

[10 Dec 2008 | No Comment | ]

Having trouble activating the G1 Android Google Phone?

If you buy the G1 Android in a store, you probably won’t have problems activating it since they help you set it up. However, if you buy the phone online and use an existing SIM card, I suggest calling T-mobile first to make sure you have the G1 data plan on your line.

View More...

PHP »

[3 Dec 2008 | No Comment | ]

If you have older scripts, you may encounter warning messages such as “Notice: Undefined variable: ”

As a standard practice, you should define variables in PHP by putting in the variable name = FALSE;
$myvar = FALSE;

This is primarily for local variable names that aren’t passed in through a $_REQUEST or $_POST, etc.

View More...

PHP »

[24 Nov 2008 | No Comment | ]

I found a useful script in PHP that can be used for checking uptime of a server. It can be useful for checking when the servers have a such a significant load that pages can’t be displayed. The benefit or running it locally is that I can configure the script to perform failover functionality if necessary. Online uptime services are good too, but most of them aren’t free. Maybe I should force the server to show a failwhale when the site gets too busy… j/k :D

Here’s the link to the script.
http://www.programmingtalk.com/showthread.php?t=34999


// the URL you want to ...

View More...