Adding Extra Fields

PedigreePoint supports user definable fields in addition to the default fields which are: PedigreeId, Name, SireId, DamId, Sex, DOB, PreTitle, PostTitle, RegNo, Color, Photo. Some of the fields could be renamed or repurposed - specifically:  PreTitle, PostTitle, RegNo, Color.

Adding fields to the end of these default fields is automatic. They will appear in all reports and even the search page.
You simply need to add the extra fields to the MySQL table. PedigreePoint detects the extra fields and uses the field name when displaying the data. Hence if you add a field called "Owner" then if that field contains say "Mrs Brown" then it will be displayed as
"Owner= Mrs Brown".

Recently we added a feature whereby marks can be displayed in the pedigree view. These are blocks of a solid color to indicate that that record has been marked with a specific color. The field used to store marks is called _Marks. It will not automatically be displayed as a value but will be displayed as a mark.

Change table schema

The first step is to modify the schema of your MySQL pedigree table. You can do this by login to your PHP MySQL admin console as described here. The in the SQL tab paste the following command

alter table `pedigree` ,add column `Owner` varchar (64) NULL;

but modify it first by replacing Owner with the name of the column you are adding and replace 64 with the size of the field. Since MySQL only allocates as much storage as is required to hold the data, allocating a field size of 64 is just as efficient as allocating 8.

Note that any field names you use in MySQL must not have any spaces in the name - this is a limitation of the PHP scripts we use, not MySQL

Modify export expression

The normal export string used in BreedMate is:

%2, '[Name]', %3, %4, '[Sex]', '[DOB%1]', '[Titles]', '[Obedience]', '[Reg No.]', '[Colour]', '[Photo]'

Note that it has 11 fields. If we had added two fields as described above called Owner and Breeder the export string would have to be modified to:

%2, '[Name]', %3, %4, '[Sex]', '[DOB%1]', '[Titles]', '[Obedience]', '[Reg No.]', '[Colour]', '[Photo]','[Owner]','[Breeder]'

Note that the name in square brackets must be the exact name of a field in your BreedMate database (not MySQL) and if it is anything except a number it should be enclosed in single quotes.

Modify pp_search.htm

This is an optional step. If you would like users to be able to search on any extra fields you add, you should modify the HTML code in the file pp_search.htm as described in .How to set search fields

Its that easy! After exporting to MySQL the extra fields will be displayed for any entry if that field contains data.