# Anything wrong with this UPDATE query?

**URL:** <https://forum.kirupa.com/t/anything-wrong-with-this-update-query/258929>\
**Category:** Uncategorized\
**Created:** [April 29, 2008, 4:56pm UTC](https://forum.kirupa.com/t/anything-wrong-with-this-update-query/258929 "2008-04-29T16:56:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [April 29, 2008, 4:56pm UTC](https://forum.kirupa.com/t/anything-wrong-with-this-update-query/258929/1 "2008-04-29T16:56:49Z")

</div>

```php

    $label = htmlspecialchars(mysql_escape_string($_POST['labelClass']));
    
    $bib_id = htmlspecialchars(mysql_escape_string($_POST['bib_id']));
       
    $thing = substr($bib_id, 9);

    $sql = "UPDATE bibs SET labelClass = '$label' WHERE bib_id = '$thing'";
    $result = mysql_query($sql) or die(mysql_error());

```

seems ok to me, but it’s not working :S . I’ve also done it with locking and unlocking tables etc…too. still no dice.

any tips or advice, much appreciated. cheers.
