$key="id=22";
$result = mysql_query('SELECT `tblproducts`.`configoption3` '.' FROM tblproducts '.' WHERE `tblproducts`. $key ') or die(mysql_error());
$row = mysql_fetch_assoc($result);
What am I doing wrong with the above in regards $key variable. Basically i want declare the id once and use the $result multiple times (ie resusable ) and change the id value as when and where
Getting error "Unknown column 'tblproducts.$key' in 'where clause' "
Its probably a silly syntax issue but am in programmers blind spot
I need to change configoption3 to be stored idealy as a variable .. So that I can reassign as fit
Any help would be appreciated ..
_____________________________________________
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add
Edited by Taras (Sun 06-Jun-10 15:56:41)



Print Thread
Taras