php - unexpected T_ENCAPSED_AND_WHITESPACE -


i have looked , can not tell error if 1 see not can point me in right direction fix here code

 $con=mysqli_connect("localhost", $user_name, $password, $database_name);  // check connection  if (mysqli_connect_errno())  {  echo "failed connect mysql: " . mysqli_connect_error();  }    $result = mysqli_query($con,"select * `$table_name` energy < 30");    while($row = mysqli_fetch_array($result))  {   $newenergy = $row['energy'] + 1; mysqli_query($con,"update $table_name set energy = $newenergy uuid =$row['uuid']"); }  enter code here  mysqli_close($con);  ?> 

change

mysqli_query($con,"update $table_name set energy = $newenergy uuid =$row['uuid']") 

to

mysqli_query($con,"update $table_name set energy = $newenergy uuid ={$row['uuid']}") 

for complex variables, need use {} syntax.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -