PHP - specific query -


i have problem. dont dont know wat do. cant seem how limit query.

for example.

t1 has 5 columns . . .

   username, itema, itemb, itemc, itemd 

the colums itema itemd primary keys t2. t2 has 2 columns, id , items.

t2 contains id, items. has 4 rows under items. . .`

  shirt,socks,short,pants. 

the username dadi in t1 has 2 entries shirt itema , socks itemb. remaining 2 fields empty. how perform query tells me last username dadi has 2 missing entry short , pants?

for further explanation.. want perform query display $rows itemc , itemd short , pants because missing in t1. result display short , pants , not first 2 because user 'dadi' has shirt , socks itema , itemb.

well check if field null/ empty depending default defined in table. done few ways, either row dadi , use php check if column null or have select statement selects users missing value itemc , itemd :

select username t1 t1.itemc null , t1.itemd null


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -