MarkR wrote:The "delete" statement only ever deletes rows. It will NEVER change the contents of an existing row, only delete them.
Thats what I want it to do.. delete the entire row. But for some reason, it is deleting the content, but not the row.
Why is your web application doing an ALTER TABLE? DDL statements (such as ALTER TABLE) should never normally be used in a conventional application. Keep the database schema the same throughout normal operation instead.
Mark
The reason I am altering the table is to re number the PID column. The structure of the table is the same, I m just dropping the column and adding a new one with the same setup... this way the auto increment will restart.
For example, Lets say I have the following table:
PID | Page Name | Content
+----------------------------------------------------------------+
1 | Home | Something
2 | About | About Us
3 | Links | New links
+----------------------------------------------------------------+
When I delete the about page (PID 2)... Im left with:
PID | Page Name | Content
+----------------------------------------------------------------+
1 | Home | Something
[COLOR=Red] 3 [/COLOR] | Links | New links
+----------------------------------------------------------------+
So, I figure I would drop the PID column and rebuild it so
it auto fills with auto_increment so I have:
PID | Page Name | Content
+----------------------------------------------------------------+
1 | Home | Something
[COLOR=Red] 2[/COLOR] | Links | New links
+----------------------------------------------------------------+
But instead, I get this:
+----------------------------------------------------------------+
1 | Home | Something
2 [COLOR=Red]| |[/COLOR]
3 | Links | New links
+----------------------------------------------------------------+
Maybe that will help explain it?