0

I know that mysql_* is obsolete today, but I need to use it anyway at the moment. Could you please tell me how can I update a table where column equals php variable?

$qid = $_POST['idc'];
mysql_query("UPDATE `db`.`table` SET `status` = 'canceled' WHERE idc = $qid");

Thank you

8
  • what is this $qid = ['idc'];?? Commented Apr 18, 2014 at 14:45
  • just mistake, corrected Commented Apr 18, 2014 at 14:45
  • what is your table name? Commented Apr 18, 2014 at 14:46
  • So, MySQL is obsolete? Commented Apr 18, 2014 at 14:46
  • he mean,mysql_* functions :) Commented Apr 18, 2014 at 14:46

1 Answer 1

1
 mysql_query("UPDATE `db`.`table` SET `status` = 'canceled' WHERE `idc` = '$qid'");
Sign up to request clarification or add additional context in comments.

3 Comments

If it helped you, please consider accepting the answer, tks!
Yeah, i can do it in five minutes and i will, tnx
Sounds great, I like it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.