While a am working on my secret project, I found a need for a local developing and testing environment which would provide the functionality of a LAMP stack (a WAMP Stack in my case). I had known about this nifty tool for a while, but had never had a chance to play with it at all. It's called XAMPP - it is essentially a WAMP or LAMP or MAMP stack rolled into ONE pre-configured package that you can run on just about any system.
Programming - Code
After spending a good deal of time trying to figure out what was wrong with my query, I finally spotted the problem. After doing some research on Google and trying all sorts of suggested 'solutions', the easiest one was right in front of me.
Here is the query that was causing the error: (names have been changed to protect identity)
DELETE r1_main FROM r1_main as r1, temp1 as b
WHERE r1.id = b.id
AND DATE(b.`timeStamp`) < DATE(init_startDate)
AND DATE(b.`timeStamp`) > DATE(init_endDate);
This statement kept throwing this error in the MySQL procedure:
SQL Error: Unknown table 'r1_main' in MULTI DELETE
The reason for my lack of posting is directly related to the workload that I currenly have. A big project that I love working on had me consumed for the past 2 weeks, but within that time, I've learned a ton of new things and I'll be posting more about this in the coming days.
One of the first things I had to do for a project was move a few tables form different database together, into one database. It’s a simple enough command:
RENAME TABLE database1.table1 TO database2.table1;
Having to move data from one location to another, or one drive to another in a database can be quite a hair-raising expericene. With MySql, it’s really not that bad. I have a database on a Window 2003 server, but the steps for Linux and Mac OSX are very similar.
But just to be sure that we won’t be shooting ourselves in the foot, lets make a backup of our databases. Whichever way you choose to do it is your call… ( mysqldump, using a 3rd party tool to create a csv files of your tables…etc)
First, lets shutdown the database: