problem with php script - truncate table

Greetings,

I have a php script that gets some data and inserts it into a mysql database.

Before it inserts the data it truncates the tables that it is going to insert into.  

that looks like this:

$query = "TRUNCATE TABLE features_tab";

$result = mysql_query($query);

Recently that part isn't working so when it runs it just adds to the database and it results in duplicates then triplicates and so on.

This coincides with moving the site to a new server.

So I am thinking about how to figure this out.  What is the best way to see what $result is in this example.

Thanks very much.

Sky
Schuyler KuhlAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
$query = "TRUNCATE TABLE features_tab";
$result = mysql_query($query) or die (mysql_error());

and you should know what the error is you get.
0
 
Schuyler KuhlAuthor Commented:
thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.