hy im trying to get the variable from the_sub_field(‘imgimg’);
to my sql query
while ( have_rows(‘extras’,1) ) : the_row();
$var=the_sub_field(‘imgimg’);
echo $sql = “SELECT count(*) as total from student where gift like ‘”.$var.”‘”;
endwhile;
i can print the variable , but when trying to use it inside mysql its not showing
thank you
the :
echo $var;
works perfect
but the query shown as
SELECT count(*) as total from student where gift like ”;