Jump to content


Photo

trouble deleting rows


  • Please log in to reply
1 reply to this topic

#1 blanktarget

blanktarget
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 06 November 2003 - 11:49 PM

I\'m using this:
DELETE FROM table WHERE table_id=100;
to delete the row where the id is 100. Only it\'s deleting the whole table.
It\'s not that I don\'t know how to do it, i just haven\'t learned it yet.

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 07 November 2003 - 05:29 AM

DELETE FROM table WHERE table_id=100;

Cant believe that this deleted the whold table did you have records with only table_id 100??

How are you executing this ssatement using PHP or in the mysql prompt?

You can give this a try.

DELETE FROM table WHERE table_id=\'100\';

If you still have problme post with your code and sample table data.
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users