Firefox 3
Quick navigation:

isThere

Finds if a multi field contains a certain reference or value. Should be used as a function in condition of ptb_select.

Advanced version of this function is isThereExt.

Syntax

$var = ptb_select($database, "isThere('<needle>', 'fieldname')");

Syntax description

$database
variable containing connected database
<needle>
reference or value looked for
fieldname
actual name of multi field

Sample(s)

Find all records belonging to the category, which code is 5 (they may belong to more categories than one, though, since it's a multi field!):

$var = ptb_select($myDatabase, "isThere('5', '%category')");

Find all records belonging to the category "sci-fi" (again, they may belong to more categories than this one):

$var = ptb_select($myDatabase, "isThere('sci-fi', 'category')");