Re: Why does my delete not work :(

2002-03-29 Thread Anvar Hussain K.M.
Hi sunny, Yes it is a sad scenario. But hopefully this feature would be available in the near future. If you cannot use a programming language the only way AFAIK is to use temporary tables. Create temporary table temptable SELECT messages.*, if(main.topicid is null,1,0) deleteflag FROM mess

RE: Why does my delete not work :(

2002-03-29 Thread Todd Williamsen
query"); While ($row =mysql_fetch_arrary($result)) { $sql2 = "DELETE FROM messages WHERE topicid = $row ="[0]" "; } -Original Message- From: Todd Williamsen [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 6:47 PM To: 'sunny'; 'Rodney B

RE: Why does my delete not work :(

2002-03-29 Thread Todd Williamsen
ED]] Sent: Friday, March 29, 2002 6:18 PM To: Rodney Broom; [EMAIL PROTECTED] Subject: Re: Why does my delete not work :( So you're saying there's no actual DELETE statement for this? There is no way in hell I can write any SQL to do that?? Thats sucks... :( Thanks for the exam

RE: Why does my delete not work :(

2002-03-29 Thread Todd Williamsen
Here: mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 6:18 PM To: Rodney Broom; [EMAIL PROTECTED] Subject: Re: Why does my delete not work :( So you're saying there's no actual DELETE statement for this? There is no way in hell I can write any SQL to do that?? T

Re: Why does my delete not work :(

2002-03-29 Thread sunny
So you're saying there's no actual DELETE statement for this? There is no way in hell I can write any SQL to do that?? Thats sucks... :( Thanks for the example, but how do I run it? I've only used PHP for taking information out of a database and other simple MySQL queries so while your Pe

Re: Why does my delete not work :(

2002-03-29 Thread Rodney Broom
Good morning Sunny, From: sunny <[EMAIL PROTECTED]> > ...substituting SELECT with DELETE doesn't work :( That's right, that's how MySQL works. And it doesn't support sub-queries for this case, either. So you can't say: delete from table where field in (select field from other_table) I'd s

RE: Why does my delete not work :(

2002-03-29 Thread Rick Emery
To: [EMAIL PROTECTED] Subject: Why does my delete not work :( Hi all! I've got this piece of SELECT statement for MySql. SELECT * FROM messages LEFT OUTER JOIN main ON messages.topicid=main.topicid WHERE main.topicid is null; so the select statement works fine. But what I'd like to d

Why does my delete not work :(

2002-03-29 Thread sunny
Hi all! I've got this piece of SELECT statement for MySql. SELECT * FROM messages LEFT OUTER JOIN main ON messages.topicid=main.topicid WHERE main.topicid is null; so the select statement works fine. But what I'd like to do is actually delete those rows instead. but substituting SELECT with DE