Ingolme Posted May 30, 2020 Share Posted May 30, 2020 You will probably run into a syntax error because the values are not quoted. Link to comment Share on other sites More sharing options...
Elton Posted May 30, 2020 Author Share Posted May 30, 2020 https://prnt.sc/sqsjr8 Link to comment Share on other sites More sharing options...
Ingolme Posted May 30, 2020 Share Posted May 30, 2020 From that error is looks as if you forgot to put a $ on your variable name on line 12. Link to comment Share on other sites More sharing options...
Elton Posted May 30, 2020 Author Share Posted May 30, 2020 https://prnt.sc/sqsm7i it seems like it works partially but it imports incorrectly Link to comment Share on other sites More sharing options...
Ingolme Posted May 30, 2020 Share Posted May 30, 2020 Your update query does not have a WHERE clause, so it updates every single row in the table. Use a WHERE clause to restrict the update to a particular row. See examples in the MySQL tutorial: https://www.w3schools.com/sql/sql_update.asp Link to comment Share on other sites More sharing options...
Elton Posted May 30, 2020 Author Share Posted May 30, 2020 $query = "UPDATE `$dbname` SET name='%s', url='%s', short='%s', game='%s' WHERE name;"; Link to comment Share on other sites More sharing options...
Ingolme Posted May 30, 2020 Share Posted May 30, 2020 If that works, it probably will update any row which has a name. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now