Delete all from a table


Posted on 16th Feb 2014 07:03 pm by admin

I can not get the following code to work. If I run the sql statement in the db it will delete all the data but it will not work from the page. My connection string is fine I just can not get it to delete.

Code: <?php
include 'dbc.php'


mysql_query("delete from categories");

include 'redirect_category.php';
?>

No comments posted yet

Your Answer:

Login to answer
281 Like 33 Dislike
Previous forums Next forums
Other forums

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash