Jump to Navigation

MySQL

MySQL - If Exists Then Update Record Else Insert How To

Although there is a sql ansi standard each database vendor has its own proprietary extensions and MySQL is no different. These changes, although small, are frustrating enough to cost hours of lost time and productivity. One of the issues I lost some time on was how to do an "if exists ... then ...else" statement in a stored procedure, basically to have some dynamic sql execute an update or an insert query depending on whether the record already existed or not.

Open Source: 

Resizing ext3 partitions with parted

The other day I got an new laptop and , due to the windows tax, it came with Windows Vista pre-installed. I usually don't even bother booting into windows but just slap in the Linux DVD and choose "Use entire disk" at the appropriate point in the installation.

Open Source: 

Importing Pastel customer info into vTiger

We recently had to import some masterfile information from Pastel into vTiger for a client. Since a lot of SA companies use Pastel I thought I would write "how to" to help others to use vTiger and get a state of the art, open source, CRM system up and running.

This "how to" assumes a clean vTiger database i.e. a fresh vTiger install. It would not be hard to get the scripts to workwith a database that already has data. The scripts would need to be adjusted for the next crmentity sequence number.

Open Source: 

Database Support - MySQL, Postgres Open Office Base

Databases are the mainstay of any business critical system today. They enable the central storage and retrieval of transactional information for many business processes and allow for the advanced reporting of management information. Key to any business system then is the database platform used and the database design for your applications.

Open Source: 

Simple mysql backup script.

Here is a simple backup script that we use to backup MySQL servers where there are a large number of databases. Each database is dumped out to separate file making restoration for individual databases much easier. Usually scripts dump all databases out into one large file. This is problematic if there are many databases and some of them are large. Simple copy the script into /etc/cron.daily to have it executed each day.

Open Source: 
Subscribe to RSS - MySQL


by Dr. Radut.