• guy 1966 (1/7/2016)


    I try this :

    UPDATE `categories` SET `parent_id`= 0 [2055] WHERE `sort_order`= 1

    the 2055 is the value to try to applie, but I have error syntax... I use the sql editer on my server to white the code.

    thank!

    Of course you're getting an error. You didn't replace the zero, you just replaced the comment.

    This seems like some RDBMS different from SQL Server. I'm not sure if the quotes and square brackets are needed or might be causing a syntax error as well.

    UPDATE is basic in SQL. You should study how to correctly generate statements with the basic DML (INSERT, UPDATE, DELETE) before implementing any code. It's dangerous and you could get in lots of trouble.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2