-2

Parse error: syntax error, unexpected '"', expecting ',' or ')' in /home/givecoin/public_html/script/common.php on line 475

$q = $sql->prepare("UPDATE `".$dbtable_prefix."Settings` SET `value` = ? WHERE `name` = 'version'");

line475

Ege
  • 1
  • 1
  • 1
    the quotes you use around your 'version' argument don't look right, they are both different to everywhere else in the string. – Darren Lamb Jul 03 '19 at 10:51
  • 1
    @DarrenLamb The quotes look correct to me. `'version'` is a string literal and the backticks are for identifiers (column & table names) – TiiJ7 Jul 03 '19 at 11:32

1 Answers1

0

Try by adding new line after each string part. Eg:

$q = $sql->prepare(
  "UPDATE `" . 
  $dbtable_prefix .
  "Settings` SET `value` = ? WHERE `name` = 'version'"
);

This won't fix the problem, but it will provide you a better line information: the code you posted does not have any parsing error, so I think your problem is before the line 475.

When PHP, or Byson/FLEX (the parser/lexer behind php), tells you that there was an unexpected character, then it tells you what it expect: the line simply correspond to where it could not find the expected characters.

If it awaits a ',' or a ')', this means you probably have an error before the line 475, for example:

474. $a = ($b
//------^ missing ')'
475. $q = $sql->prepare("")

This would (I did not test) fail

NoDataFound
  • 11,381
  • 33
  • 59