Posted in Ruby on Rails (RoR) on October 24, 2007 | No Comments »
The most common time zone conversions are the conversion of system local time to UTC, and the conversion of UTC to local time by “Time.gmtime” method and “Time.localtime” method respectively. These conversions are easy for both Time and DateTime objects.
def convert_zone(to_zone)
[...]
Read Full Post »
Posted in Mysql on October 24, 2007 | No Comments »
Suppose you have table like
User Table with fields id(auto increment) and name
address table with field id(auto increment), address, user_id(foreign key)
when u inserted one row in user table then u want the last inserted id value in user table to insert it into address table in the field user_id for that corresponding user address entry
use mysql [...]
Read Full Post »
Posted in Mysql on October 24, 2007 | No Comments »
This section deals with mysqldump which is a tool to import and export MySQL databases.
It can be used to back up a database or to move database information from one server to another.
1. Export A MySQL Database
This example shows you how to export a database. It is a good idea to export your data [...]
Read Full Post »