View Full Version : How to empty a table?
SRBuckey5266
10-13-2009, 11:13 PM
What type of code would I put on my website for this?
Fumigator
10-13-2009, 11:52 PM
http://dev.mysql.com/doc/refman/5.0/en/truncate.html
SRBuckey5266
10-14-2009, 03:43 AM
Sorry, that doesn't help at all.
Old Pedant
10-14-2009, 05:16 AM
What part of that didn't you understand???
Do you not know how to execute a query in whatever server-side language you are using? ASP or JSP or CF or PHP or whatever it is?
If you aren't using a server-side language/system, then you won't be able to do this.
Do you need to see how to execute a query? In what language? For example, in ASP code using VBScript:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "...you have to supply a connection string..."
conn.Execute "TRUNCATE TABLE theNameOfYourTable;"
%>
Done.
Fumigator
10-14-2009, 03:44 PM
Sorry, that doesn't help at all.
I don't mean to be rude but you're not learning anything by expecting others to write the code for you so you can copy/paste it into your own script. You need to be learning the principals behind the problems you are faced with. I recommend you visit Amazon and find a couple of books to read and then spend some hours and days and weeks really really really studying and absorbing everything in the books.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.