This is probably a really silly question but when I run this sql query:
It only deletes whatever is in category_name in the row not the entire row. Why? Shouldn't it delete the entire row?Code:$sql = "DELETE category_id, category_name FROM categories WHERE category_id='" . sanitize($_POST["cbxCategory"]) . "';";
Well, you specify it to delete columns. if you do DELETE FROM.. it will do the row.
I didn't know you could delete columns like that :-)
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
You know what I feel really stupid. There was no problem with my sql code because the two columns above are the only columns in the table.
The problem was my form was sending the POST data to the wrong page for processing.![]()
oh.. no wonder why...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks