-
Running Plodding & Limping
easy way to copy a mysql table?
I have a table full up with crap entries like "please work", "this time pleaase" etc etc
I have about 60 off rows of rubbish that I need to delete. Now if I delete the lot the new ID will still #61 right?
Not that its a big deal but is there any simple way of copying a tables structure but not the actual records? So I'd have a nice clean table with ID starting with 1 etc.
I'm using phpMyAdmin if that helps.
-
Running Plodding & Limping
ah nevermind, done it now
-
Hi there,
You could use TRUNCATE like so:
PHP Code:
$deleted_rows = mysql_query("TRUNCATE TABLE table_name");
Cheers.
-
Running Plodding & Limping
I was just playing with the "operations" bit and there was some options to copy just the structure..perfect!
thanks for replying though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|