Ryan,
Thanks for your help. I'm not able to ssh into this box - how can I run
this script, basically all I have to work with is MySQL Query Broswer.
TIA
From: Ryan Stille <[EMAIL PROTECTED]>
To: mysql@lists.mysql.com
Subject: Re: Need script to populate data.
Date: Fri, 25 May 2007 13:19:34 -0500
This should do it. Save it in a file then run it like "perl newfile.pl".
Save the output into a text file, then run it against your database.
$records = 100;
for ($i=1;$i<=$records;$i++) {
print "INSERT INTO MyTable (forumid, styleid, title, title_clean, " .
"description, description_clean, options) VALUES\n";
print "($i, 888, 'title $i', 'clean title $i', 'description $i', " .
"'clean description $i', 999);\n"
}
so:
perl newfile.pl > test_records.sql
mysql -p mydatabase < test_records.sql
-Ryan
http://www.stillnetstudios.com
SRM SRM wrote:
Group,
I'm an oracle dba and new to mysql. I've just recieved responsiblity to
work on a mysql project. Basically I have 1 table:
forumid smallint(5) unsigned NO (null) 0 (null)
styleid smallint(5) unsigned NO (null) 0 (null)
title varchar(100) NO (null) (null) (null)
title_clean varchar(100) NO (null) (null) (null)
description text YES (null) (null)
description_clean text YES (null) (null)
options int(10) unsigned NO (null) 0 (null)
I need a script that will insert, say 10000, records into this table.
Note, I dont really care about the content of the data (ie, the title
could be TITLE1, TITLE2, TITLE3...TITLE10000, whatever). Im just
interested in populating the table with X amount of rows and being able to
perform some stress tests.
TIA
_________________________________________________________________
PC Magazines 2007 editors choice for best Web mailaward-winning Windows
Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
_________________________________________________________________
More photos, more messages, more storageget 2GB with Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]