siric Posted December 3, 2009 Share Posted December 3, 2009 Hi, I am inserting temporary values into a table for use on a resultset. Once I am done I want to clear the data out of the table and have used both //clear tempbiz table $sqlClearBiz = "DELETE from tempbiz"; $resClearBiz = mysql_query($sqlClearBiz); and //clear tempbiz table $sqlClearBiz = "TRUNCATE tempbiz"; $resClearBiz = mysql_query($sqlClearBiz); but neither work. However, I run the command in an SQl client, it works. What can I check?? Quote Link to comment Share on other sites More sharing options...
cags Posted December 3, 2009 Share Posted December 3, 2009 Try... $sqlClearBiz = "TRUNCATE tempbiz"; $resClearBiz = mysql_query($sqlClearBiz) or die(mysql_error()); To see if it is reporting an error with the request. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 4, 2009 Share Posted December 4, 2009 FYI, if you ever had any other records linked to this table by UID, you'd better clear them out, or reset the auto-increment value, or you'll be sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.