Prefilter Query Syntax

Status
Not open for further replies.
Hi there, I added a databasejoin field to my jos_users table to link a user to his relevant Vendor. The field name - tendor_vendor (yes, yes speling error , slip of the findger!)

I have the tender_invitees table now with a "field tender_vendor_id" that is a record indicating that the vendor is invited to tender

I now want to pre-filter this tender_invitee list to only show the tenders that rekates to the user that is logged in.

I want to look up the Tendor_vendor (ID) from jos_users and limit the tender_invitee list to only show those records where tender_vendor_id is the tendor_vendor number for my logged in user

So :I added a pre-filter (eval) and MY syntax says

Where [tender_vendor_id] [EQUALS] and then in value the following

$db =&JFactory::getDBO();
$db->setQuery("SELECT `'tendor_vendor` FROM `jos_users` where `id` = $my->id");
$the_vendor = $db->loadResult();
return $the_vendor;

It shows "no records" but I know that I am "registered" as a vendor who is "invoted"

Can any one see anything wrong in my syntax please???
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top