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

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc

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