2015-09-21, 05:32 PM
Hello,
Basically, I want to update one row inside my database but the code I am using seems to update all the rows.
Is there a way to target the one row? I have a fid field which determines different tickets, e.g. 1 is support etc..
I have another field, by, which determines who submitted the ticket
I have another field, resolved, which determines if the ticket has been resolved or not
I have a last field, info, which stores the ticket message.
Should I make a uid field and target the uid of the ticket that I want to change to resolved?
How would I go about targetting the uid?
Thanks in advance
EDIT: So if the UID was 1, then i want to update the resolved field to y ONLY where the uid is 1 instead of updating all the rows.
Basically, I want to update one row inside my database but the code I am using seems to update all the rows.
$db->update_query("tickets", array("resolved" => "y"));
Is there a way to target the one row? I have a fid field which determines different tickets, e.g. 1 is support etc..
I have another field, by, which determines who submitted the ticket
I have another field, resolved, which determines if the ticket has been resolved or not
I have a last field, info, which stores the ticket message.
Should I make a uid field and target the uid of the ticket that I want to change to resolved?
How would I go about targetting the uid?
Thanks in advance
EDIT: So if the UID was 1, then i want to update the resolved field to y ONLY where the uid is 1 instead of updating all the rows.