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

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

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