Hi guys,
I need some help with updating my MySQL DB. I want the collum status to be 2 instead of 1, when the user clicks a button.
Like so: Status=1 in mysql Button click status=2 in mysql.
Is that possible?
UPDATE
Maybe u should look at the ENUM TYPE too ...
I've read the info about update, but i dont get it. How do i update only 1 row?
You need to use WHERE, something like this:
UPDATE table SET status = 2 WHERE id = 10
In the WHERE statment you need something that will only point to that one row you want to update. In my example only the row with the field id set to 10 will be updated.
Now how do i do that, when the user clicks a button, that is included with the row. like so
(row1) STatus=1 CLICK HERE! (row2_ status=1 CLICK here
Then, i click row2's click, it will update row 2.
CyCloneNL wrote:I've read the info about update, but i dont get it. How do i update only 1 row?
Between my post and your post is 40 min dif., how do u expect to know how to do it u don't even have time to read carefully the links I gave u, how many examples did u tried before saying that u don't understand?
If u are to lazy to try, then I'm sorry that I loose my time reading your post ...
Been trying for 3 weeks, several forums, reading half of the mysql manual, read two books.
Then show me your script, to see what u have been tryed ...
regsys.freehostia.com
I started out as a complete n00b, and i think i got pritty far in 3 weeks. I also built a login system, but im gonna replace that one. Its using cookies, i want to learn using sessions.
I started learning co's i need to make a problem registration system. Im pritty far on the assignment actually almost done. This is my only problem left!
I said to put the code with your update that u tried and is not working ...
BTW, check your script (this page beheer.php)...
What's wrong with beheer.php?
erhm.. i cant get acces to it!