Where filter based on another table

iamwe

New Member
Hello,
Thanks for your help. I am attempting to filter reservation data, based on current user id, and data from another table that has checked in reservations.
I have attempted the following but, it does not filter, and all the user's reservations display even if they are old.
I would like to filter out the reservations that have already been checked in, which are listed in a different table.

Thanks for your help!!!

Goal:
1) call confirmed reservations (dbase: jos_vikbooking_orders.confirmnumber) with ($my->id)
2) filter out reservations numbers that are already on file in another table (Check-ins)
3) Desired result: only see reservations that are confirmed but not checked in.

CURRENT CODE: Plugin databasejoin
TAB Data
Table: jos_vikbooking_order Value: confirmnumber Label: confirmnumber

TAB Date-where
WHERE ujid = {$my->id}
AND 'jos_vikbooking_orders.confirmnumber' != 'register_check_in.reservation_id'
ORDER BY id DESC

//RESULT reservation confirmations data not filtered by check-in confirmation table of same DB.
 
The syntax is wrong in any case, with quotes '' you are comparing strings, not columns.

Something like
...
AND jos_vikbooking_orders.confirmnumber NOT IN (SELECT register_check_in.reservation_id FROM ...)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top