line

Add to any feed reader

Re: Date Format Problem & changing data type in MySQL database

First update the data to the correct internal format:
[code]
UPDATE yourTable SET sdate = str_to_date(sdate, ‘%m/%d/%y’;
[/code]
Change the column to DATE:
[code]
ALTER yourTable MODIFY COLUMN sdate DATE;
[/code]
Then to query the data:
[code]
SELECT date_format(sdate, ‘%m/%d/%y’)
[/code] (more…)

Transactions example

Transactions are used to make ensure that a series of statements either all get processed or don’t get processed at all — basically all or nothing. Why is this important? Let’s consider a simple banking example. You transfer $500 from one bank account into another:



1. - $500 from account A

2. + $500 to account B



Step 1 processes successfully, but something bad happens between step 1 and 2. Where is your money now — you just lost $500!! This is clearly not acceptable, we need to be able to confidently say that steps 1 and 2 must all process s (more…)

End Query with \G instead of ;

You can use \G instead of ; for tables with lots of fields.



mysql> SHOW STATUS LIKE ‘Qcache%’;

+————————-+———–+

| Variable_name | Value |

+————————-+———–+

| Qcache_queries_in_cache | 6990 |

| Qcache_inserts | 6990 |

| Qcache_hits | 3987 |

| Qcache_lowmem_prunes | 0 |

| Qcache_not_cached | 621 |

| Qcache_free_memory | 176329432 |

| Qcache_free_blocks | 1 (more…)

Installing PHP under Windows: Further Configuration of WAMP

( Page 1 of 4 ) In his last article, Matthew showed us how to successfully install and configure WAMP (Windows, Apache, MySQL and PHP) to setup a development environment. In this next piece, learn how to make use of the Apache and PHP configuration files to further enhance your server needs. In the previous tutorial , your WAMP system on your home PC is best for use as a development server only. You may be able to host a personal home page or hobby page, but of course this would only be… (more…)

Installing PHP under IIS and creating a Discussion

Jayesh Jain Introduction If you are a great fan of PHP, you might have installed PHP on an Apache server and used MySQL as the backend on windows or a linux machine. Most of the people will develop and test their code on a windows machine till they move their work on a production machine. In this article I am going to step you through installing PHP under IIS (Internet Information Server) on Windows 2000 and use Microsoft Access as backend (in fact you could use Foxpro, SQL Server,… (more…)

« Previous PageNext Page »