0

My delete.php is sending the selected item to the db as dead as it should, but the blog is still staying on the page that its deleted from. What am I doing wrong? this is my query: on the delete.php:

$MyBlog =  $_GET['id'];

$query = "UPDATE `Blogs` SET `status` = 'dead' WHERE `id` = '".$MyBlog."'";

Like I said, this is marking id dead on the db as it should, but not deleting the actual blog off of the page, is this because I don't have: AND `status` != 'dead' on the page it's getting sent from?

4

2 回答 2

3

Fine. I'll just post the correct answer then (note the typo in Kieran's):

SELECT * FROM blog WHERE status!='dead'

That's what your SELECT query should look like.

于 2009-11-05T00:05:27.700 回答
0

您如何选择博客页面上的条目。

SELECT * FROM blog WHERE status NOT dead

也许这会奏效?

于 2009-11-04T23:44:54.683 回答