Wednesday, 29 August 2018

Do you have trouble updating the database using php

I have a database called specials with a table called specials, the table has 6 rows, there are 3 records a record with an id of 1,2, and 3. One of the rows is called title. I have data already there but I want to update the data using a form. How ever my mysqli_query is not working.

Here is my code.
mysqli_query($connect, "UPDATE specials SET title=san diego WHERE id='1'");


Assuming title is varchar and id is int
mysqli_query($connect, "UPDATE specials SET title='san diego' WHERE id=1");

0 comments:

Post a Comment