-
Book Overview & Buying
-
Table Of Contents
CMS Made Simple Development Cookbook
In relational databases, tables almost always have a unique identifier for each row, known as the primary key. While there are occasional reasons to do otherwise, it's common practice to use an otherwise meaningless integer for this key. This unique identifier can be used for joining the table or for identifying a row when you perform an update.
When adding data to a database table, it is expected that you will provide a value for this key. So where do you get an integer value that you can rely on to be unique?
This recipe shows you how to use the ADOdb facility for creating unique integer sequences, and for getting values from the sequence.
1. Create a module stub by any of the methods described in Chapter 4, Getting Started with Modules. Call your new module "Planets".
2. Using your favorite editor, create a new file and type the following code:
<?php
if (!isset($gCms)) exit;
$taboptarray = array('mysql' => 'TYPE=MyISAM');
$dict ...
Change the font size
Change margin width
Change background colour