SELECT
IF(`l`.`en`='',`l`.`hu`, `l`.`en`) AS `childBreed`,
`child`.`cid` AS `childCid`,
`child`.`uid` AS `childUid`,
`child`.`post_id` AS `childPost`,
`child`.`id` AS `childId`,
`child`.`data` AS `child`,
`child`.`public` AS `childPublic`,
`child`.`notown` AS `childNotown`,
`child`.`offspringsLength` AS `childoffspringsLength`,
`child`.`offspringsLitter` AS `childoffspringsLitter`,
IF(`l2`.`en`='',`l2`.`hu`, `l2`.`en`) AS `breedName`,
`c`.`species` AS `breedSpecies`,
`c`.`categorys` AS `breedCategorys`,
`c`.`icon` AS `breedicon`,
`c`.`latin`,
concat('[',SUBSTRING(`child`.`interested`,1,CHAR_LENGTH(`child`.`interested`) - 1),']') AS `interested`,
`treefather`.`id` AS `treefatherId`,
`treefather`.`uid` AS `treefatherUid`,
`treefather`.`data` AS `treefather`,
`treefather`.`public` AS `treefatherPublic`,
`treefather`.`notown` AS `treefatherNotown`,
`treemother`.`id` AS `treemotherId`,
`treemother`.`uid` AS `treemotherUid`,
`treemother`.`data` AS `treemother`,
`treemother`.`public` AS `treemotherPublic`,
`treemother`.`notown` AS `treemotherNotown`,
`child`.`day_last_edit` AS `meday_last_edit`
FROM `animals` AS `child`
LEFT JOIN (`animals` AS `treefather`) ON (`treefather`.`id`=child.father_id)
LEFT JOIN (`animals` AS `treemother`) ON (`treemother`.`id`=child.mother_id)
LEFT JOIN (`category` AS `c`) ON (`c`.`id` = `child`.`cid`)
LEFT JOIN (`lang` AS `l2`) ON (`l2`.`id` = `c`.`name`)
LEFT JOIN (`breed` AS `b`) ON (`b`.`id` = SUBSTRING_INDEX(SUBSTRING_INDEX(`child`.`data`, '"breed":"', -1),'"', 1))
LEFT JOIN (`lang` AS `l`) ON (`l`.`id` = `b`.`name`)
WHERE `child`.`id`=14370SELECT
IF(`l`.`en`='',`l`.`hu`, `l`.`en`) AS `childBreed`,
`child`.`cid` AS `childCid`,
`child`.`uid` AS `childUid`,
`child`.`post_id` AS `childPost`,
`child`.`id` AS `childId`,
`child`.`data` AS `child`,
`child`.`public` AS `childPublic`,
`child`.`notown` AS `childNotown`,
`child`.`offspringsLength` AS `childoffspringsLength`,
`child`.`offspringsLitter` AS `childoffspringsLitter`,
IF(`l2`.`en`='',`l2`.`hu`, `l2`.`en`) AS `breedName`,
`c`.`species` AS `breedSpecies`,
`c`.`categorys` AS `breedCategorys`,
`c`.`icon` AS `breedicon`,
`c`.`latin`,
concat('[',SUBSTRING(`child`.`interested`,1,CHAR_LENGTH(`child`.`interested`) - 1),']') AS `interested`,
`treefather`.`id` AS `treefatherId`,
`treefather`.`uid` AS `treefatherUid`,
`treefather`.`data` AS `treefather`,
`treefather`.`public` AS `treefatherPublic`,
`treefather`.`notown` AS `treefatherNotown`,
`treemother`.`id` AS `treemotherId`,
`treemother`.`uid` AS `treemotherUid`,
`treemother`.`data` AS `treemother`,
`treemother`.`public` AS `treemotherPublic`,
`treemother`.`notown` AS `treemotherNotown`,
`child`.`day_last_edit` AS `meday_last_edit`
FROM `animals` AS `child`
LEFT JOIN (`animals` AS `treefather`) ON (`treefather`.`id`=child.father_id)
LEFT JOIN (`animals` AS `treemother`) ON (`treemother`.`id`=child.mother_id)
LEFT JOIN (`category` AS `c`) ON (`c`.`id` = `child`.`cid`)
LEFT JOIN (`lang` AS `l2`) ON (`l2`.`id` = `c`.`name`)
LEFT JOIN (`breed` AS `b`) ON (`b`.`id` = SUBSTRING_INDEX(SUBSTRING_INDEX(`child`.`data`, '"breed":"', -1),'"', 1))
LEFT JOIN (`lang` AS `l`) ON (`l`.`id` = `b`.`name`)
WHERE `child`.`id`=14394SELECT
IF(`l`.`en`='',`l`.`hu`, `l`.`en`) AS `childBreed`,
`child`.`cid` AS `childCid`,
`child`.`uid` AS `childUid`,
`child`.`post_id` AS `childPost`,
`child`.`id` AS `childId`,
`child`.`data` AS `child`,
`child`.`public` AS `childPublic`,
`child`.`notown` AS `childNotown`,
`child`.`offspringsLength` AS `childoffspringsLength`,
`child`.`offspringsLitter` AS `childoffspringsLitter`,
IF(`l2`.`en`='',`l2`.`hu`, `l2`.`en`) AS `breedName`,
`c`.`species` AS `breedSpecies`,
`c`.`categorys` AS `breedCategorys`,
`c`.`icon` AS `breedicon`,
`c`.`latin`,
concat('[',SUBSTRING(`child`.`interested`,1,CHAR_LENGTH(`child`.`interested`) - 1),']') AS `interested`,
`treefather`.`id` AS `treefatherId`,
`treefather`.`uid` AS `treefatherUid`,
`treefather`.`data` AS `treefather`,
`treefather`.`public` AS `treefatherPublic`,
`treefather`.`notown` AS `treefatherNotown`,
`treemother`.`id` AS `treemotherId`,
`treemother`.`uid` AS `treemotherUid`,
`treemother`.`data` AS `treemother`,
`treemother`.`public` AS `treemotherPublic`,
`treemother`.`notown` AS `treemotherNotown`,
`child`.`day_last_edit` AS `meday_last_edit`
FROM `animals` AS `child`
LEFT JOIN (`animals` AS `treefather`) ON (`treefather`.`id`=child.father_id)
LEFT JOIN (`animals` AS `treemother`) ON (`treemother`.`id`=child.mother_id)
LEFT JOIN (`category` AS `c`) ON (`c`.`id` = `child`.`cid`)
LEFT JOIN (`lang` AS `l2`) ON (`l2`.`id` = `c`.`name`)
LEFT JOIN (`breed` AS `b`) ON (`b`.`id` = SUBSTRING_INDEX(SUBSTRING_INDEX(`child`.`data`, '"breed":"', -1),'"', 1))
LEFT JOIN (`lang` AS `l`) ON (`l`.`id` = `b`.`name`)
WHERE `child`.`id`=14399SELECT
IF(`l`.`en`='',`l`.`hu`, `l`.`en`) AS `childBreed`,
`child`.`cid` AS `childCid`,
`child`.`uid` AS `childUid`,
`child`.`post_id` AS `childPost`,
`child`.`id` AS `childId`,
`child`.`data` AS `child`,
`child`.`public` AS `childPublic`,
`child`.`notown` AS `childNotown`,
`child`.`offspringsLength` AS `childoffspringsLength`,
`child`.`offspringsLitter` AS `childoffspringsLitter`,
IF(`l2`.`en`='',`l2`.`hu`, `l2`.`en`) AS `breedName`,
`c`.`species` AS `breedSpecies`,
`c`.`categorys` AS `breedCategorys`,
`c`.`icon` AS `breedicon`,
`c`.`latin`,
concat('[',SUBSTRING(`child`.`interested`,1,CHAR_LENGTH(`child`.`interested`) - 1),']') AS `interested`,
`treefather`.`id` AS `treefatherId`,
`treefather`.`uid` AS `treefatherUid`,
`treefather`.`data` AS `treefather`,
`treefather`.`public` AS `treefatherPublic`,
`treefather`.`notown` AS `treefatherNotown`,
`treemother`.`id` AS `treemotherId`,
`treemother`.`uid` AS `treemotherUid`,
`treemother`.`data` AS `treemother`,
`treemother`.`public` AS `treemotherPublic`,
`treemother`.`notown` AS `treemotherNotown`,
`child`.`day_last_edit` AS `meday_last_edit`
FROM `animals` AS `child`
LEFT JOIN (`animals` AS `treefather`) ON (`treefather`.`id`=child.father_id)
LEFT JOIN (`animals` AS `treemother`) ON (`treemother`.`id`=child.mother_id)
LEFT JOIN (`category` AS `c`) ON (`c`.`id` = `child`.`cid`)
LEFT JOIN (`lang` AS `l2`) ON (`l2`.`id` = `c`.`name`)
LEFT JOIN (`breed` AS `b`) ON (`b`.`id` = SUBSTRING_INDEX(SUBSTRING_INDEX(`child`.`data`, '"breed":"', -1),'"', 1))
LEFT JOIN (`lang` AS `l`) ON (`l`.`id` = `b`.`name`)
WHERE `child`.`id`=10744SELECT
IF(`l`.`en`='',`l`.`hu`, `l`.`en`) AS `childBreed`,
`child`.`cid` AS `childCid`,
`child`.`uid` AS `childUid`,
`child`.`post_id` AS `childPost`,
`child`.`id` AS `childId`,
`child`.`data` AS `child`,
`child`.`public` AS `childPublic`,
`child`.`notown` AS `childNotown`,
`child`.`offspringsLength` AS `childoffspringsLength`,
`child`.`offspringsLitter` AS `childoffspringsLitter`,
IF(`l2`.`en`='',`l2`.`hu`, `l2`.`en`) AS `breedName`,
`c`.`species` AS `breedSpecies`,
`c`.`categorys` AS `breedCategorys`,
`c`.`icon` AS `breedicon`,
`c`.`latin`,
concat('[',SUBSTRING(`child`.`interested`,1,CHAR_LENGTH(`child`.`interested`) - 1),']') AS `interested`,
`treefather`.`id` AS `treefatherId`,
`treefather`.`uid` AS `treefatherUid`,
`treefather`.`data` AS `treefather`,
`treefather`.`public` AS `treefatherPublic`,
`treefather`.`notown` AS `treefatherNotown`,
`treemother`.`id` AS `treemotherId`,
`treemother`.`uid` AS `treemotherUid`,
`treemother`.`data` AS `treemother`,
`treemother`.`public` AS `treemotherPublic`,
`treemother`.`notown` AS `treemotherNotown`,
`child`.`day_last_edit` AS `meday_last_edit`
FROM `animals` AS `child`
LEFT JOIN (`animals` AS `treefather`) ON (`treefather`.`id`=child.father_id)
LEFT JOIN (`animals` AS `treemother`) ON (`treemother`.`id`=child.mother_id)
LEFT JOIN (`category` AS `c`) ON (`c`.`id` = `child`.`cid`)
LEFT JOIN (`lang` AS `l2`) ON (`l2`.`id` = `c`.`name`)
LEFT JOIN (`breed` AS `b`) ON (`b`.`id` = SUBSTRING_INDEX(SUBSTRING_INDEX(`child`.`data`, '"breed":"', -1),'"', 1))
LEFT JOIN (`lang` AS `l`) ON (`l`.`id` = `b`.`name`)
WHERE `child`.`id`=14302
View it enlarged