Guest User

Untitled

a guest
Jul 16th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. foreach ($disArray as $a) {
  2.  
  3. $query = "SELECT num FROM '".$tableName."' WHERE question='" .$a."'";
  4. $result = mysql_query($query, $this->conn) or die('Error: '.mysql_error());
  5. $row = mysql_fetch_array($result);
  6. //$row['num'] = $row['num'] + 1;
  7.  
  8. $numb = $row['sayi'] + 1;
  9.  
  10. $query = "UPDATE ".$tablename." SET `num`=".$numb."WHERE `question`=".$a.";
  11. mysql_query($query, $this->conn);
  12. }
  13.  
  14. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE question='Where are you from?'' at line 1
  15.  
  16. $query = "SELECT num FROM '".$username."' WHERE question='" .$a."'";
  17.  
  18. """ <-- fuck
Add Comment
Please, Sign In to add comment