# Please help with a command

**URL:** <https://forum.kirupa.com/t/please-help-with-a-command/261278>\
**Category:** programming\
**Created:** [May 25, 2008, 5:06pm UTC](https://forum.kirupa.com/t/please-help-with-a-command/261278 "2008-05-25T17:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nubian](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nubian](https://forum.kirupa.com/u/nubian)\
**Post date:** [May 25, 2008, 5:06pm UTC](https://forum.kirupa.com/t/please-help-with-a-command/261278/1 "2008-05-25T17:06:43Z")

</div>

i currently have this in my php file.

```php

mysql_query("UPDATE inventory SET id_num ='$id_num' WHERE id_num ='$id_num'");
mysql_query("UPDATE inventory SET id_asset ='$id_asset' WHERE id_num ='$id_num'");

```

instead of updating this tables how do i set it up for deletion?  
i’m still new to php and i thought this would work.

```php
mysql_query("DELETE FROM inventory SET id_num ='$id_num' WHERE id_num ='$id_num'");
mysql_query("DELETE FROM inventory SET id_asset ='$id_asset' WHERE id_num ='$id_num'");

```

but it doesn’t unfortunately.

any help will greatly be appreciated.  
thank you

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [May 25, 2008, 7:54pm UTC](https://forum.kirupa.com/t/please-help-with-a-command/261278/2 "2008-05-25T19:54:53Z")

</div>

DELETE FROM inventory WHERE id\_num = ‘$id\_num’;

---

<div class="post-metadata">

**Author:** ![nubian](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nubian](https://forum.kirupa.com/u/nubian)\
**Post date:** [May 27, 2008, 3:19am UTC](https://forum.kirupa.com/t/please-help-with-a-command/261278/3 "2008-05-27T03:19:10Z")

</div>

[QUOTE=sekasi;2331008]DELETE FROM inventory WHERE id\_num = ‘$id\_num’;[/QUOTE]  
thank you that worked.  
question, i have a bunch of tables i would like to delete at one given time, is it possible to combine a deletion of multiple tables at one given time?

[QUOTE=TheColonial;2331493]cool… let me know what the URL is when you’re done. Then i can browse to it like so:

http://your\_url/file.php?id\_num=’;DROP%20TABLE%20inventory;[/QUOTE]

this is not up on an actual server.  
this is set up on a local machine.

---

<div class="post-metadata">

**Author:** ![joef5052881](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@joef5052881](https://forum.kirupa.com/u/joef5052881)\
**Post date:** [May 28, 2008, 1:02pm UTC](https://forum.kirupa.com/t/please-help-with-a-command/261278/4 "2008-05-28T13:02:47Z")

</div>

wanna to play [age of conan gold [url=http://www.igxz.com/age-of-conan-gold-s.html]aoc gold [url=http://www.igxz.com/]lotro gold [url=http://www.lotro-sale.com/age-of-conan-gold/]age of conan gold [url=http://aoc.rgtr-credit.com/]age of conan gold](http://www.igxz.com/age-of-conan-gold-s.html)??
