Problems with blob field

Hi I’m using the onlineshop example, and I’m trying to make a little change in form_cart.
I want to show the product picture in cart, so in blank_add_cart app I made this modification



$sid = session_id();


/**
 * Selecting a field from another table
 */

// Check for record

$check_sql = "SELECT picture"
   . " FROM products"
   . " WHERE productid = '" . [v_product] . "'";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]}))     // Row found
{
    $pic = {rs[0][0]};
		
    
}
		else     // No row found
{
		    {pic} = ' ';
    
}


	
sc_exec_sql("INSERT INTO cart (session_id, productid, quantity, picture) VALUES ('".$sid. "', ". [v_product] .", 1, ". $pic .")");

sc_redir(form_cart);


But, the sql statement shows a sintax error message.

The field picture is a blob field, but if I run the sql statement in phpmyadmin (with values, not variables of course), everything works fine

What can I do?

edit: btw, is not problem of size images, just 6 or 7 KB max