- Messages
- 4,715
- Reaction score
- 2
- Points
- 28
- Thread Starter
- #1,121
@sir eric
baka po matulungan nyo ako...
need help sa codes using vb to mysql database
comparing ng 2 table
sa table1 merong 2 fields
sa table2 meron din 2 fields
ngayon ganito..., may condition
(table1)
<field1> | <field2>
0001 | meron
0002 | wala
0003 | wala
(table2)
<field1> | <field2>
0001 | yes
0002 | no
0003 | yes
ang condition ay ito:
mag cocombine yung dalawang table then
if wala and no ang nakalagay sa <field2> ni table1 at table2 then
hndi lalabas yung records na yun
else if wala then
hindi lalabas yung records na yun
elseif no then
hindi lalabas yung records na yun
else
lalabas yung record na un
end if
yan po ung problem sql or mysql leftjoin or innerjoin di ko alam kung pano
sana matulungan nyo ako
TIA
tirahin mo sa WHERE
INNER JOIN sa Field1
WHERE (table1.field2 <> "wala" and table2.Field2 <> "yes") OR (table1.field2 <> "wala") OR ......