I’m trying to pass a variable from within a swf to a php service to get some crap out of the db.
when I do this:
function getProjectThumbs()
{
$sql = 'SELECT `project_display` FROM `tbl_images` WHERE locate( \'1\', project_id ) ORDER BY `project_displayid`';
return mysql_query($sql);
}
works totally fine, but when I remove the hardcoded item in
WHERE locate( \'1\', project_id )
and replace it with
WHERE locate( \'$var\', project_id )
to become this
function getProjectThumbs($var)
{
$sql = 'SELECT `project_display` FROM `tbl_images` WHERE locate( \'$var\', project_id ) ORDER BY `project_displayid`';
return mysql_query($sql);
}
I get no results. can I not pass a variable this way? any help is greatly appreciated!