Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error [duplicate]

Tags:

i've been staringly blanky at this error and can't seem to know what the problem is.When i run the query i get this error:

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING at this line:

$sqlupdate1 = "UPDATE table SET commodity_quantity=$qty WHERE user=$rows['user'] "; 
like image 637
che Avatar asked Mar 06 '12 11:03

che


1 Answers

try this

echo $sqlupdate1 = "UPDATE table SET commodity_quantity=$qty WHERE user='".$rows['user']."' "; 
like image 173
Ullas Prabhakar Avatar answered Oct 29 '22 10:10

Ullas Prabhakar