and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I am trying to build a database (and that works fine) but i want to have an output when i ask for excample "Halfsibling - same mother:"
details of the database:
[syntax="sql"]CREATE TABLE `dog_table` (
`Id` int(11) NOT NULL auto_increment,
`DogRegis` varchar(30) default NULL,
`DogName` varchar(50) default NULL,
`DogTitle` varchar(60) default NULL,
`Callname` varchar(20) default NULL,
`DOB` date default NULL,
`DOD` date default NULL,
`Gender` varchar(20) default NULL,
`Color` varchar(20) default NULL,
`FatherId` int(11) default NULL,
`MotherId` int(11) default NULL,
`WrightCoef` varchar(20) default NULL,
`CountryOrig` varchar(20) default NULL,
`Kennel` varchar(20) default NULL,
`Breeder` varchar(20) default NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `DGPrimRegNbr` (`DogRegis`,`DogName`)
) ENGINE=MyISAM
Can some one help me with a script for displaying halfsiblings - same mother??
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
assigning two entries to the table with the same MotherId is not a problem. I can't get it wright to get an output of the dogs ho have the same mother.
SELECT * FROM `dog_table` WHERE `MotherId` = 2191 ORDER BY DogName ASC
this works perfect with mysql.
Below of that page i want to have a link, if i thake that it most know what mother and display the result. How do i do that with PHP
Mind sharing your solution so others can benefit from your fervent efforts? And please edit your original post title and add '[SOLVED] - ' to the beginning. Thanks.