problem with php script - truncate table
Posted on 2010-08-23
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.