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'
Did you know?Explore Trending and Topic pages for more stories like this.


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 web service error
hey guys,
I'm working on a project requires the use of web services. I've been trying a few tutor

Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statem

Accept only alpha characters
I've got this bit of code ready for accepting a phrase:

Code: if (!eregi ("", $_POS

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.

Using CSS to format MySQL query
Hi,

If i want to have a news page on my site, which displays all records of a table in descen

background color imagefill
Hello

I would like to ask you why I see this square in red color just in my local xampp insta

Remore client postprocessing phase getting dump SAPSQL_ARRAY_INSERT_DUPREC
Hello Expects,I have started remore client copy. Data was copied successfully. but while running pos

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