Viewing Category » Database Systems

MySQL Mathematics

Post Thumbnail of MySQL Mathematics
 Coding Tips,Database Systems 15 September 2010

There are times that we want to perform mathematical equations using MySQL, I am not saying that it is wise to directly apply mathematics inside your queries but they can be useful inside stored procedures.

(Note: you need to be on INNODB engine mode to use stored procedure)

This article will show you what mathematical functions you can use that was supported by MySQL. Please also take in caution that MySQL is a database engine and not a real calculator so please avoid performing complex equations on your database.

Modulus

select 87 % 9;
+--------+
| 87 % 9 |
+--------+
|      6 |
+--------+

MySQL Shortcuts (Scores)

Post Thumbnail of MySQL Shortcuts (Scores)
 Coding Tips,Database Systems 14 September 2010

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. MySQL is primarily an RDBMS and therefore ships with no graphic user interface (GUI) tools to administer the databases or manage the data inside it.

Users can readily use the included command-line tools or download MySQL frontends from various parties that have developed software and web applications to manage MySQL database. An administrator GUI pack also exists on the official MySQL website which may require extra java modules for connectivity.

This article assumes that you already have an idea on what MySQL databases are and how to use them. Please make sure that you already have a working backup copy of your current database when using the following tips.

When moving data between two tables which you already have structures intact, you can do them using Insert / Select pair.

INSERT INTO `userrecords` (`id`, `name`, `email`,  `password`, `refferer`, `joindate`) SELECT `memberid`, `username`, `useremail`, `userpass`, `userrefferer`, SYSDATE() FROM `db.members`;

MS SQL Server 2008 with PHP

Post Thumbnail of MS SQL Server 2008 with PHP

I personally choose not to use Micro$oft products when it is possible, but sometimes the choice is not given. For these unfortunate who have to deal with SQL Server 2008 (or 2005), here is how to get around without too many swear words and avoid licensing costs.

Requirements

  1. Windows Vista, Windows 7 or Win XP
  2. .Net Framework 3.5 SP1
  3. Windows Installer 4.5
  4. Windows PowerShell 1.0
  5. MS Core XML Services (MSXML) 6.0

Note: In order to download windows Power Shell, you need to pass the genuine windows checking. You can still google for alternative download locations preventing the need for the checking. Power Shell also comes preinstalled from windows 7 including .Net framework 3.5 but it wont eliminate the need to download the service pack.

© 2011 - 2012 Vhortex's Little Digital Journey PolkaDot designed by ZENVERSE

Optimized by SEO Ultimate