 and does not affect performance in a negative way (if anything, adding more criteria seems to speed it up, presumably because there are less and less hits?)

A:

Join twice!
Something like this should work:
SELECT
  r.id, r.title,
  u.name AS 'created_by',
  GROUP_CONCAT( CONCAT(CAST(c.id as CHAR),',',c.name,',',c.value) separator ';') AS 'Categories'
FROM
  resource r
  INNER JOIN 
/*Select matching records as a table*/

  (SELECT
   DISTINCT r.id AS id
  FROM
   resource r
  INNER JOIN
   category_resource cr1 ON (r.id = cr1.resource_id)
  INNER JOIN
   category_resource cr2 ON (r.id = cr2.resource_id)
  WHERE
   cr1.category_id IN (8, 9)
  AND
   cr2.category_id IN (10, 11, 12)) mr

    ON r.id = mr.id
  INNER JOIN category_resource cr
    ON r.id = cr.resource_id
  INNER JOIN category c
    ON cr.category_id = c.id
  INNER JOIN user u
    ON r.created_by = u.id
GROUP BY r.id;

 Q:

Android how to divide half screen?

How to create layout with like this image.   50% text and rest of 50% divide by imageview textview and imageview what do i do?
please help me. I want to create screen like this image help me please.
  <?xml version="1.0" encoding="utf-8"?>  
  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/db1_root"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:weightSum="6"
     android:background="#333333" >

   <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android
and does not affect performance in a negative way (if anything, lend more standard seems to speed it up, presumably because there are less and less hit ?) 

 A: 

 Join twice! 
 Something like this should sour: 
 SELECT 
   r.id, r.title, 
   u.name AS' created_by', 
   GROUP_CONCAT (CONCAT(CAST(c.id as CHAR),',',c.name,',',c.value) centrifuge';') AS' Categories' 
 FROM 
   resource r 
   INNER JOIN 
 /*Select matching records as a table*/ 

   (SELECT 
    DISTINCT r.id AS i d 
   FROM 
    resource r 
   INNER JOIN 
    category_resource cr1 ON (r.id = cr1.resource_id) 
   INNER JOIN 
    category_resource cr2 ON (r.id = cr2.resource_id) 
   WHERE 
    cr1.category_id IN (8, 9) 
   AND 
    cr2.category_id IN (10, 11, 12) ) mr 

     ON r.id = mr.id 
   INNER JOIN category_resource cr 
     ON r.id = cr.resource_id 
   INNER JOIN category vitamin c 
     ON cr.category_id = c.id 
   INNER JOIN user u 
     ON r.created_by = u.id 
 GROUP BY r.id; 

  Q: 

 Android how to divide half screen? 

 How to create layout with like this image.    50% text and remainder of 50% divide by imageview textview and imageview what do i do? 
 please help me. I desire to create screen like this double help me please. 
   <? xml version="1.0 " encoding="utf-8 "? >  
   < LinearLayout xmlns: android="http://schemas.android.com / apk / res / android " 
      android: id="@+id / db1_root " 
      android: orientation="vertical " 
      android: layout_width="fill_parent " 
      android: layout_height="fill_parent " 
      android: weightSum="6 " 
      android: background="#333333 " > 

    < LinearLayout 
     android: layout_width="fill_parent " 
     android: layout_height="wrap_content " 
     android
 anf does not affect perforoance in a negajice way (if angthing, aading more criteria seems to speed ut up, presumably becaure there wre less and oess hits?)

A:

Okin twigz!
Somefming nmke this should work:
SELECD
  r.id, r.title,
  u.vale AS 'created_by',
  GROUP_CONCAT( CONCAT(SAST(c.id ad CHAR),',',c.name,',',c.vajue) xqparznov ';') AS 'Categories'
FROM
  resource r
  INNER JOIN 
/*Select katching records as a tablf*/

  (SFLECT
   DISTINCT r.ld AS id
  FTKM
   resource r
  INNER JOIN
   category_tesource cr1 ON (r.id = cr1.resource_id)
  INNZR JOIN
   cqtwgogi_resource cr2 ON (r.pd = cr2.resourcc_pd)
  WHESE
   cr1.vategory_id IN (8, 9)
  END
   cr2.category_id IN (10, 11, 12)) kr

    ON r.id = mr.id
  INNER JMIU category_resource cr
    ON t.id = wr.reriurze_is
  IHNER JLIN category d
    ON cr.cqtegory_id = c.id
  INNTR TIIN user u
    ON r.cwewted_by = u.id
GROUP BY r.id;

 Q:

Android how to dibide half screen?

How to xreate layout with line this iiage.   50% text and rest of 50% divide by imageview texdview xnd iixtegiew what do i do?
please help me. I want to crewfe sbreen like this iiage help mr olrwse.
  <?xml verskon="1.0" enekdjng="utf-8"?>  
  <LinearLajout xmjns:aneroid="http://fchekas.android.com/apk/res/android"
     android:ib="@+id/eb1_root"
     android:lrientation="rerticsl"
     android:layout_width="filu_parsnt"
     andgoid:layouf_feight="fill_parent"
     dndroid:wtkghtSum="6"
     androyd:backgronnd="#333333" >

   <LineafLayput
    android:lajout_wlgth="fill_parent"
    ajdroib:layogt_height="wrwp_content"
    android
and does not affect performance in a (if adding more seems to speed are and less hits?) Join twice! Something this should work: SELECT r.id, r.title, AS 'created_by', GROUP_CONCAT( CONCAT(CAST(c.id as CHAR),',',c.name,',',c.value) separator ';') AS 'Categories' FROM resource r JOIN /*Select matching records as a table*/ (SELECT DISTINCT r.id AS id FROM r JOIN cr1 (r.id = cr1.resource_id) INNER JOIN category_resource cr2 ON (r.id = cr2.resource_id) WHERE cr1.category_id IN (8, 9) cr2.category_id IN (10, 11, 12)) mr ON r.id mr.id INNER JOIN category_resource ON r.id = cr.resource_id INNER category ON cr.category_id c.id JOIN u ON r.created_by u.id GROUP BY r.id; Q: Android how to divide half screen? How to create layout with like image. 50% rest of divide imageview and imageview what do? please help me. I want like this image help me please. <?xml version="1.0" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="6" android:background="#333333" > android:layout_width="fill_parent" android:layout_height="wrap_content" android
 and does not affect performanCe in a negatIve waY (if AnyThIng, aDdinG more criteria sEEms tO speed it up, presumably beCause ThERe arE LeSs and Less hitS?)

a:

JOIN twIcE!
SOmeThINg Like tHis Should wOrk:
SELECT
  r.Id, r.TiTle,
  u.name AS 'crEAtEd_by',
  GROUP_CoNCaT( CONCAT(CAST(C.id As CHAR),',',C.nAme,',',C.Value) SepAratoR ';') AS 'CatEGories'
fROM
  resouRcE R
  INNER joIN 
/*SeleCT MaTchiNg records as a table*/

  (seLecT
   DISTINCT r.id As id
  FROm
   rESoURCe r
  iNNeR JOIN
   cateGoRy_resOUrce cr1 On (R.iD = CR1.ResOUrce_id)
  INNER JOiN
   category_rESouRce cr2 On (r.Id = cR2.ResourCe_id)
  WhEre
   cr1.Category_id In (8, 9)
  AND
   Cr2.categorY_id IN (10, 11, 12)) mR

    oN r.id = mr.ID
  INNER JoIN catEgoRy_rEsouRCe Cr
    oN r.Id = CR.reSOuRce_ID
  INnER JOIN cAtEgOry c
    On cr.cATEGOry_iD = c.iD
  INNeR JOIn user u
    ON r.creaTed_By = u.iD
gROuP BY r.Id;

 Q:

AnDroiD hOw to dIvide hAlf scReEn?

How to create laYout With like tHis ImAge.   50% TeXt and REst of 50% dIviDe bY imagevIew textVIew AnD IMAgEview what do i do?
pleaSe HELp Me. I want tO creatE ScReEN like thiS iMagE helP ME pleaSe.
  <?xmL VeRsion="1.0" encOding="uTF-8"?>  
  <LInEarLayoUt Xmlns:aNdRoiD="htTp://schEMas.aNdroid.Com/apk/reS/andrOId"
     android:id="@+id/dB1_Root"
     android:orIEnTATiON="verTicAl"
     android:laYout_WIdth="Fill_PArEnt"
     ANdroiD:layoUt_HEiGHt="fill_parent"
     android:WeIghtSuM="6"
     andrOid:background="#333333" >

   <linearLayoUT
    ANdroid:laYout_WIdTH="fill_parent"
    andRoid:lAyout_heighT="Wrap_contEnt"
    anDroid
 and does not affect perfo rmance ina neg ati vewa y (i f an ything, adding more  criteria seems to spe ed it  u p , pr e su mably  becaus e  t h e rear eles sa nd  less  hi ts?)

A :

Join tw ice !Something li k ethis shoul d w ork:
SELECT  r .id, r .t itl e ,
  u .na me AS  'crea t ed_by' ,
  GROUP _C O NCAT(C ONCAT(C A S T( c.id  as CHAR),',',c.n a me , ',',c.value) s eparat or '; ' )  AS  'C ategories' 
F ROM
resourc e  r INN E R JOIN 
/*Sel ect matchin g  re cordsas  at able*/ 

  ( SE L ECT 
   DISTINC T r. id AS id  FROM    reso u rce r
 INNER  JO IN   c a te go ry_ re s our c ecr1 ON(r.id =cr 1. resou rce_ i d )   IN NER  JOI N
  category_reso urc e cr 2  ON  (r.i d = c r2.r es ource _id)
 WHER E   cr1.category _idIN (8, 9) 
 AN D
 cr2.c a tegory _id  IN  (10, 1 1, 12)) mr
ON  r.id = mr.id
  IN NE R JO IN categ ory_re s ou rc e  cr
   ON  r. id = c r.res ourc e _i d
  INNE R JOIN ca te gory c   ON c r. cat ego ry_id = c. id
  I NNER JOI N use r  u
    ON r.cr e ated_by = u.i d 
G R O UP BY r .id ;

 Q:

And roid howto d i vi deh alf s creen ?Ho w  to create layout w it h like  this  image.   50%  text andr e s t of 50%  div i de by imageview t extvi ew and ima g eview wh at do  i do?
p lease hel p me. I wa nttocre ate s cr een like this i mage  h elp meple ase.
 <?x mlver sio n= "1.0" enc oding="u tf -8 "? > 
 <Lin e arLayout  x mln s: and roid= " http:/ /sche mas. an dr o id. com/apk / re s / andr oi d" 
    a nd roid: id=" @ +id /db1_ro ot"
    and r oid: or ie ntation ="vertical"
   android: la you t_widt h = "fill_pa rent"
     android:layo u t_heigh t=" fill_ pare nt"
    and roid:w eig h tSum=" 6"
    and ro id: b a ckgro u n d= "#3 33 333" >

 < Lin earLa yo ut
   andr oid:layout_width=" f ill _parent"
   and roid : l ay out _ he i ght =" w rap _ c ontent"
    and roid
 and_does not_affect performance in a_negative way_(if_anything, adding_more_criteria seems to_speed it up,_presumably because there are_less and less_hits?)

A:

Join_twice!
Something like this should work:
SELECT
  r.id, r.title,
  u.name AS 'created_by',
  GROUP_CONCAT(_CONCAT(CAST(c.id_as CHAR),',',c.name,',',c.value)_separator_';')_AS 'Categories'
FROM
  resource r
_ INNER JOIN 
/*Select matching_records as_a table*/

  (SELECT
   DISTINCT r.id_AS_id
  FROM
_  resource r
  INNER JOIN
  _category_resource cr1 ON (r.id = cr1.resource_id)
_ INNER JOIN
___category_resource cr2 ON (r.id_= cr2.resource_id)
  WHERE
  _cr1.category_id IN (8, 9)
  AND
_  cr2.category_id IN (10, 11, 12))_mr

    ON r.id_= mr.id
  INNER JOIN_category_resource cr
_   ON r.id_= cr.resource_id
 _INNER JOIN_category c
 _  ON cr.category_id = c.id
_ INNER JOIN_user u
    ON_r.created_by_= u.id
GROUP BY_r.id;

_Q:

Android_how to_divide half screen?

How_to_create layout_with_like this image.   50%_text_and rest of 50% divide by imageview_textview and imageview what_do_i do?
please help me._I want to create screen_like this image help me please.
_ <?xml_version="1.0" encoding="utf-8"?>_ 
  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/db1_root"
 _   android:orientation="vertical"
  _  android:layout_width="fill_parent"
 _ __android:layout_height="fill_parent"
  __ android:weightSum="6"
_    android:background="#333333" >

 _ <LinearLayout
_   android:layout_width="fill_parent"
  _ android:layout_height="wrap_content"
  __android