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

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

please help me... my password gets encrypted but not able to get in database
hai guys,
please help me... in the following function my password gets encrypted but no

help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de

getAlexaRank($url) function not working
I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Help: calling function
Hi,
Is it possible to call a php function on page close?
If yes, could you explain how and whe

Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

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