Why can't I do this and is there a way around it.
if(getProduc($make, $department, $model, $err) || $err=='Multiple Entries') {
$output.='A similar product already exists';
}
Right, $err in the function getProducts is passed by reference (a pointer, &) and the function returns true if one, unique product can be found false if none or more than one can be found (this behavious is necessary for lots of other places) . The problem is that the result does not seem to be getting into $err until after the condition is completed. So if there's more than one similar product the condition fails (and I get duplicate products in the database๐)
Thanks in advance
Bubble