Cant delete news :/

Started by Loffen, August 19, 2011, 02:07:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bjw

I was going to say almost the same thing.I like the idea that the person who posts has to delete it.This was as owner you can see whats up and go into your database if you feel it needs to be deleted.

Mindless

#2
Try looking at the code, you didnt add the entry so you cant delete it - simple as that, if you dont like it like that modify the query which takes 2 secs.

Code (php) Select
function deletenewsid($newsid)
    {
       
        global $CURUSER, $mc1;
        sql_query("DELETE FROM news WHERE id = $newsid AND userid = {$CURUSER['id']}");
        $mc1->delete_value('latest_news_');               
    }


Code (php) Select
function deletenewsid($newsid)
    {
       
        global $CURUSER, $mc1;
        sql_query("DELETE FROM news WHERE id = $newsid");
        $mc1->delete_value('latest_news_');               
    }


Then anyone can delete anyones news entry, was set up as is for a reason.

Loffen

When i try to delete news, it dosent remove :(
why?