i have a question here.. i have 1 dynamic table.. and i want to ask u a question, is it possible to create a where clause based on my dynamic table.. let me explain it..
this is my table
tabel Attribute
_____________________
idAttribute | Name
_____________________
1 | Width
2 | Diameter
3 | AR
etc
Is it possible to create automatic / dynamic where clause just based on that table.Name value
width = ? AND Diameter = ? AND AR = ? AND etc
Any suggestion?
Let me more explain..
lets say i have a variabel $query that contain my condition...
$query = "SELECT * FROM xxx WHERE ".$where;
Nah.. in my $where variabel, if i write it normally, based on my table above it will be..
$where = "width = ? AND diameter = ? AND AR = ?";
My question is how to create $where dynamic based on my table above, so if my table above is
idAttribute | Name
__________________
1 | Width
2 | Diameter
3 | AR
4 | Weight
It will be automaticly like this
$where = "width = ? AND diameter = ? AND AR = ? AND weight = ?";
any suggestion?