Search code examples
phpmysqlwampdelete-row

WampServer - Can't update or delete from MySQL (but I can create)


I have a strange problem with WampServer that somehow won't allow me to edit or delete any data from the database (with a php file, I have fully control when loggin into the phpMyAdmin myself). I can create data, but neither update or delete data.

The problem occurred from one day to another. Did someone have a problem like this or any guess on why this is happening?

I have tried looking for errors, but nothing is happening. I have tried looking for corrupted tables, but the error happens on every database, every table. The database user does have all the permissions needed.

Thanks,

** UPDATE ** To your who are asking for a code, sorry i didn't make it clear, but this is happening in every file and every code i tried, but here is a simple file i just created for your guys sake (that doesn't work)

<?php
$mysqli = new mysqli("localhost", "root", "code", "webshop");

$mysqli->query("UPDATE webshops SET account_premium='1' WHERE id='1'");
?>

Solution

  • I managed to fix the problem by re installing the wampserver. I think the problem was a fail in when i updated to MySQL version.