Jump to content

logandro

New Members
  • Posts

    4
  • Joined

  • Last visited

logandro's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hello i really appreciate but i still having a problem on query , how can i get the mother and father in the same sql query , at the moment i get it separately like this one select idg, n_mother from (select * from horsetest order by idg, n_mother) products_sorted, (select @pv := 'idg') initialisation where find_in_set(idg, @pv) and length(@pv := concat(@pv, ',', n_mother)) any help pleez
  2. select idg, n_father, n_mother from (select * from horsetest order by idg, n_father) products_sorted, (select @pv := '7') initialisation where find_in_set(idg, @pv) and length(@pv := concat(@pv, ',', n_father)) i have truble to get the mother -> idg i try it with this but it dosn t worck and length(@pv := concat(@pv, ',', n_father, ',',n_mother))
  3. yes this is exactly what im trying to do , think you so uch , if you can give me the fils pleez ,
  4. I am working on this page concept of pedigree. How can I foreach or create a loop that can get 6 levels of parents, for example name= 1 ; nfather=2; nmohter = 3 and the loop continue to get or consider nfather as a name = 2 and get his parents. this is my table any help plees CREATE TABLE horsetest01 ( idg int(255) AUTO_INCREMENT NOT NULL, name varchar(100), n_father int(100), n_mother int(100), gender enum ('STALION','MARSE') NOT NULL, /* Keys */ PRIMARY KEY (idg) ) ENGINE = InnoDB AUTO_INCREMENT = 8; CREATE INDEX horsetest01_index02 ON horsetest01 (name, n_father, n_mother);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.