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

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Help Ordering Arrays
Hi, I have 3 arrays as shown below.

Code: $users = $this->get_latest_users();
$flir

include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

problem when runing a funciton
I am trying to connect to database using a funciton in a functions.php

<?php
funct

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Comparing two dates
Hi Guys
I have two dates I want to compare. Below is my current implementation. The problem with

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

Production Order Enterprise Service to Manufacturing Exctn Sys (MES) ???
Hello Experts,

In our current landscape SAP ECC 5.0 is integrated to MES system via PI 7.

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