In PHP, variables are expanded insite double quotes.
If you have this:
$field="my_field";
$sql_statement="SELECT $field FROM table";
then $sql_statement will contain: "SELECT my field FROM table"
You could use this:
$strsql .= "$variabile AS IDRICHIESTA FROM Shop WHERE (((Shop.IDrif)=1";
If you want to use the content of the variable as real a string in the query, use the escaped-quote to put quotes around the vontent of the variable, like this:
$sql_statement="SELECT \"$field\" FROM table";
which gives: "SELECT "my_field" FROM table"
You are also missing quote a few )'s at the end of your statement.
Another tip: use error checking on your sql commands. It will tell you allmost exactly what is wron with your statement.
if (!($result=mysql_query(bla)))
{
print $sql_statement;
print mysql_errno().": ".mysql_error()."<BR>";
}
else
{
process the results
};