why does
$sql = 'SELECT userid FROM `phplist_user_user_attribute` WHERE `attributeid`= 7 AND `value` LIKE "68104"';
$query = mysql_query($sql);
find 23 records, but
$testvalue="68104";
$sql = 'SELECT userid FROM `phplist_user_user_attribute` WHERE `attributeid`= 7 AND `value` LIKE "$testvalue"';
$query = mysql_query($sql);
finds none? Shouldn't they be the same?
Can I not use a variable as a parameter for LIKE? Or is it a data-type issue (e.g. $testvalue is storing as a number rather than a string?)
Looks to me like these should work the same. I'm baffled (but then that's nothing new...)
Thanks,
~kyle