RE: Selected items delete

2003-04-02 Thread Don Read

On 02-Apr-2003 Pag wrote:
> 
>   Hi,
> 
>   I am kinda new to this mysql thing, so please forgive the basic
> question.
>   What i need to do is, list my records on a table with a checkbox for
> each. 
> After we choose several of the records, we click a button and i want to
> be 
> able to delete the ones selected. Is there a simple mysql command that 
> could perform this? I can do all the html/form/php list things, but the 
> mysql is out of my grasp. :-P
>   If i was too confusing, maybe this helps: How can i delete the
records 
> whose "num" field is 4,78,34 and 23, all in one command? Something along 
> "delete * in 'table' where num=1 and num=13 and num=34" etc.
> 
>   Thanks a lot.
> 
>   Pag
> 

DELETE FROM tbl WHERE num IN (4,78,34,23)

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Selected items delete

2003-04-02 Thread gerald_clark
Delete from table where num in ( 1,13,34) ;

Pag wrote:

Hi,

I am kinda new to this mysql thing, so please forgive the basic 
question.
What i need to do is, list my records on a table with a checkbox 
for each. After we choose several of the records, we click a button 
and i want to be able to delete the ones selected. Is there a simple 
mysql command that could perform this? I can do all the html/form/php 
list things, but the mysql is out of my grasp. :-P
If i was too confusing, maybe this helps: How can i delete the 
records whose "num" field is 4,78,34 and 23, all in one command? 
Something along "delete * in 'table' where num=1 and num=13 and 
num=34" etc.

Thanks a lot.

Pag





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Selected items delete

2003-04-02 Thread Philipp Specht
Hi!

Pag wrote:
If i was too confusing, maybe this helps: How can i delete the 
records whose "num" field is 4,78,34 and 23, all in one command? 
Something along "delete * in 'table' where num=1 and num=13 and num=34" 
etc.
"DELETE FROM table WHERE num=1 OR num=13 OR num=34"

or better:

http://www.mysql.com/doc/en/index.html --> search for "delete" :o)

Bye,
phly
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Selected items delete

2003-04-02 Thread Pag
	Hi,

	I am kinda new to this mysql thing, so please forgive the basic question.
	What i need to do is, list my records on a table with a checkbox for each. 
After we choose several of the records, we click a button and i want to be 
able to delete the ones selected. Is there a simple mysql command that 
could perform this? I can do all the html/form/php list things, but the 
mysql is out of my grasp. :-P
	If i was too confusing, maybe this helps: How can i delete the records 
whose "num" field is 4,78,34 and 23, all in one command? Something along 
"delete * in 'table' where num=1 and num=13 and num=34" etc.

	Thanks a lot.

	Pag



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]