I need to write a PHP script using a database for school. Since my MySQL skills are currently dying, I would like to ask following question:
Following problem: I need to insert 'upload' at a specific 'ID' into my table. It should make something like this:
insert into PHP_Project() where ID = ;
$pdo = new PDO($this->dsn, $this->username, $this->password, $this->pdoAttributes);
$statement = $pdo->prepare('insert into PHP_Project(upload) where ID = ? values (?,?)');
The MYSQL query you wrote is incorrect. You need the MYSQL UPDATE query for updating the value at a specific column.
$statement = $pdo->prepare('UPDATE PHP_Project SET upload = ? WHERE ID = ?');
Check out this tutorial Mysql update tutorial